Skip to content

Give just the host path for use in commands/scripts #25

@bradfa

Description

@bradfa

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions