Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: utility/gbb_utility.cc

Issue 3167030: touch source to test new ebuild system (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/vboot_reference.git
Patch Set: Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // Utility for manipulating Google Binary Block (GBB) 5 // Utility for manipulating Google Binary Block (GBB)
6 // 6 //
7 7
8 #include "gbb_utility.h" 8 #include "gbb_utility.h"
9 9
10 #include <assert.h> 10 #include <assert.h>
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 const char *myname = argv[0]; 468 const char *myname = argv[0];
469 int err_stage = 0; // an indicator for error exits 469 int err_stage = 0; // an indicator for error exits
470 470
471 // small parameter helper class 471 // small parameter helper class
472 class OptPropertyMap: public 472 class OptPropertyMap: public
473 std::map<GoogleBinaryBlockUtil::PROPINDEX, string> { 473 std::map<GoogleBinaryBlockUtil::PROPINDEX, string> {
474 public: 474 public:
475 bool set_new_value(GoogleBinaryBlockUtil::PROPINDEX id, const string &v) { 475 bool set_new_value(GoogleBinaryBlockUtil::PROPINDEX id, const string &v) {
476 if (find(id) != end()) 476 if (find(id) != end())
477 return false; 477 return false;
478
478 (*this)[id] = v; 479 (*this)[id] = v;
479 return true; 480 return true;
480 } 481 }
481 }; 482 };
482 OptPropertyMap opt_props; 483 OptPropertyMap opt_props;
483 484
484 struct GBBUtilOptions { 485 struct GBBUtilOptions {
485 bool get_mode, set_mode; 486 bool get_mode, set_mode;
486 string input_fn, output_fn; 487 string input_fn, output_fn;
487 } myopts; 488 } myopts;
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
638 return err_stage; 639 return err_stage;
639 } else { 640 } else {
640 printf("successfully saved new image to: %s\n", myopts.output_fn.c_str()); 641 printf("successfully saved new image to: %s\n", myopts.output_fn.c_str());
641 } 642 }
642 } 643 }
643 644
644 return 0; 645 return 0;
645 } 646 }
646 647
647 #endif // WITH_UTIL_MAIN 648 #endif // WITH_UTIL_MAIN
648
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698