~salgado/linaro-image-tools/bug-673412

« back to all changes in this revision

Viewing changes to media_create/partitions.py

  • Committer: Guilherme Salgado
  • Date: 2011-01-04 20:53:10 UTC
  • mfrom: (224.1.1 bug-697238)
  • Revision ID: salgado@canonical.com-20110104205310-5upmoah54c33resu
merge bug-697238 branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
269
269
if __name__ == "__main__":
270
270
    (board, device, fat_size, image_size, bootfs_label, rootfs_label,
271
271
        rootfs_type, rootfs_uuid, should_create_partitions, bootfs_step,
272
 
        rootfs_step) = sys.argv[1:]
 
272
        rootfs_step) = sys.argv[2:]
 
273
    out_file = sys.argv[1]
273
274
    fat_size = int(fat_size)
274
275
    should_format_bootfs = True
275
276
    should_format_rootfs = True
281
282
        board, Media(device), fat_size, image_size, bootfs_label,
282
283
        rootfs_label, rootfs_type, rootfs_uuid, should_create_partitions,
283
284
        should_format_bootfs, should_format_rootfs)
284
 
    print "BOOTFS=%s ROOTFS=%s" % (boot, root)
 
285
    # Write the boot/root partitions to the given out file to be later sourced
 
286
    # in the shell script.
 
287
    with open(out_file, 'w') as fd:
 
288
        fd.write("BOOTFS=%s ROOTFS=%s\n" % (boot, root))