-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Similar to #5 but it would be nice to have an option for sdwire to give back just the device path, such as when using it with tools like dd or bmaptool to write disk images to the SD card from the host.
sdwire block-dev would print like /dev/sdb to stdout if you only have a single SDWire device and it's in "host" mode. If there's more than one device, you'd need to use a --serial switch. If the chosen device is in "target" mode then the empty string would be output, sdwire would return non-zero, and print a useful error message to stderr.
So I could do like:
bmaptool copy disk.img $(sdwire block-dev --serial 201205)
To write my disk.img file to that SDWire device.
I'm not sure if having this feature be an extension of the sdwire list sub-command is best of if it should just be a new command like sdwire block-dev.