)]}' { "commit": "856d63cfe40d6e5a1cdcf98a828dc9e1866028a6", "tree": "d0bdff62cef98408b2462b00910cd660d6948a4d", "parents": [ "c7c8513b8ef7578569a6c3a31b87b53078b54721" ], "author": { "name": "Vadim Bendebury", "email": "vbendeb@chromium.org", "time": "Thu Mar 21 19:09:35 2013 -0700" }, "committer": { "name": "ChromeBot", "email": "chrome-bot@google.com", "time": "Fri Mar 22 14:43:52 2013 -0700" }, "message": "Fix device size calculations in write_firmware.py\n\nThe _GetDiskCapacity() function expects the device size to be reported\nas XXXX MB, but large devices have their size reported as XX.X\nGB. Common for all devices is reporting the size in bytes in the end\nof the string.\n\nThe regex fishing out the device size is being changed to look for the\nbytes size number, then the function converts it into Gigabytes and\nreturns.\n\nSome other refactoring included\n\n - reporting the situation where no removable devices have been found;\n - eliminating the ability to include device description as the\n command line parameter;\n - adjusting the help message\n - corrected a call site of _ExtractPayloadParts() reported as a\n problem by Lint\n\nBUG\u003dnone\nTEST\u003dmanual\n\n . both the following commands now work even with the cards reporting\n their size in GB:\n\n $ cros_write_firmware --board\u003dpeach -w sd:. -i image.bin\n $ cros_write_firmware --board\u003dpeach -w sd:/dev/sdc -i image.bin\n\n . when no removable device is available, the following error\n message is printed:\n\n No removable devices found\n Did you forget to plug in the SD card?\n\n . unit tests still pass\n $ FEATURES\u003dtest sudo -E emerge cros-devutils\n\n . when a wrong device is specified in the command line, the list of\n available devices is printed:\n\n $ cros_write_firmware --board\u003dpeach -w sd:/dev/sda -i image.bin\n Please specify destination -w \u0027sd:\u003cdisk_description\u003e\u0027:\n - description can be . for the only disk, or\n the full device name, one of listed below:\n Found 1 available disks.\n /dev/sdc: Generic Mass Storage Device 3.9 GB\n\nChange-Id: Ie19e34712d48179fe6ea32716d202a4ddbc1b02c\nSigned-off-by: Vadim Bendebury \u003cvbendeb@chromium.org\u003e\nReviewed-on: https://gerrit.chromium.org/gerrit/46217\nReviewed-by: Simon Glass \u003csjg@chromium.org\u003e\nReviewed-by: Doug Anderson \u003cdianders@chromium.org\u003e\n", "tree_diff": [ { "type": "modify", "old_id": "0a55291affd2c9a77628ea6368a533a9642eb8b6", "old_mode": 33188, "old_path": "host/lib/write_firmware.py", "new_id": "8515ff763e5dbf5f5463c27083a76bd82cd3cb63", "new_mode": 33188, "new_path": "host/lib/write_firmware.py" } ] }