gbb_utility: add --flags parameter.

The --flags is added to get/set the "flags" field.

BUG=chrome-os-partner:2317
TEST=gbb_utiltiy --get --flags bios.bin # see flags as 0
     gbb_utility --set --flags=0x3052 bios.bin
     # for version error message for GBB1.0 files,
     # and see flag value changed for GBB1.1+ files
     gbb_utility --get --flags bios.bin
     # flag as 0 for GBB1.0, 0x3052 for GBB1.1+

Change-Id: I7aab62c8fc32ea08b4822e496f543511ff5e5ebc
Reviewed-on: http://gerrit.chromium.org/gerrit/6721
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
diff --git a/utility/include/gbb_utility.h b/utility/include/gbb_utility.h
index 55d4a39..49d6d43 100644
--- a/utility/include/gbb_utility.h
+++ b/utility/include/gbb_utility.h
@@ -16,6 +16,7 @@
  public:
   // enumerate of available data fields
   enum PROPINDEX {
+    PROP_FLAGS = -1,// flags (virtual property)
     PROP_HWID,      // hardware id
     PROP_ROOTKEY,   // root key
     PROP_BMPFV,     // bitmap FV
@@ -39,6 +40,14 @@
   // return true on success.
   bool create_new(const std::vector<uint32_t> &create_param);
 
+  // retrieve the value of GBB header flags.
+  // return the flags value.
+  uint32_t get_flags() const;
+
+  // overwrite GBB header flags.
+  // return true on success.
+  bool set_flags(const uint32_t flags);
+
   // retrieve the value of a property from GBB data.
   // return the property value.
   std::string get_property(PROPINDEX i) const;