Changes in tools/mkhord.py [28f4adb:3c80f2b] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/mkhord.py
r28f4adb r3c80f2b 52 52 def usage(prname): 53 53 "Print usage syntax" 54 print (prname + " <ALIGNMENT> <FS_IMAGE> <HORD_IMAGE>")54 print prname + " <ALIGNMENT> <FS_IMAGE> <HORD_IMAGE>" 55 55 56 56 def main(): … … 60 60 61 61 if (not sys.argv[1].isdigit()): 62 print ("<ALIGNMENT> must be a number")62 print "<ALIGNMENT> must be a number" 63 63 return 64 64 65 65 align = int(sys.argv[1], 0) 66 66 if (align <= 0): 67 print ("<ALIGNMENT> must be positive")67 print "<ALIGNMENT> must be positive" 68 68 return 69 69 70 70 fs_image = os.path.abspath(sys.argv[2]) 71 71 if (not os.path.isfile(fs_image)): 72 print ("<FS_IMAGE> must be a file")72 print "<FS_IMAGE> must be a file" 73 73 return 74 74 75 inf = open(fs_image, "rb")76 outf = open(sys.argv[3], "wb")75 inf = file(fs_image, "rb") 76 outf = file(sys.argv[3], "wb") 77 77 78 78 header = xstruct.create(HEADER)
Note:
See TracChangeset
for help on using the changeset viewer.