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

Side by Side Diff: client/cros/fmap.py

Issue 6623026: Refactor site_fmap, flashrom_utils and gbb_utils module into client/cros. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: patch Created 9 years, 9 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 | « client/cros/flashrom_util.py ('k') | client/cros/gbb_util.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 2 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 """ 5 """
6 This module provides basic encode and decode functionality to the flashrom 6 This module provides basic encode and decode functionality to the flashrom
7 memory map (FMAP) structure. 7 memory map (FMAP) structure.
8 8
9 Usage: 9 Usage:
10 (decode) 10 (decode)
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 145
146 if __name__ == '__main__': 146 if __name__ == '__main__':
147 # main entry, do a unit test 147 # main entry, do a unit test
148 blob = open('bin/example.bin').read() 148 blob = open('bin/example.bin').read()
149 obj = fmap_decode(blob) 149 obj = fmap_decode(blob)
150 print obj 150 print obj
151 blob2 = fmap_encode(obj) 151 blob2 = fmap_encode(obj)
152 obj2 = fmap_decode(blob2) 152 obj2 = fmap_decode(blob2)
153 print obj2 153 print obj2
154 assert obj == obj2 154 assert obj == obj2
OLDNEW
« no previous file with comments | « client/cros/flashrom_util.py ('k') | client/cros/gbb_util.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698