From 456a3fc952d34a3e8781ca100851e6253c537109 Mon Sep 17 00:00:00 2001 From: Amaury Pouly Date: Thu, 5 Jan 2017 16:21:55 +0100 Subject: imxtools: various fixes for Windows Don't use colors since the terminal doesn't support it. Also packing is broken on MinGW so use #pragma pack when compiling for windows, this is also supported by MSCV. Change-Id: I635649d52ed5f2e0af46cb9ca2ec325955b2ddb2 --- utils/scsi/rbscsi.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'utils/scsi/rbscsi.h') diff --git a/utils/scsi/rbscsi.h b/utils/scsi/rbscsi.h index 2b56aabad2..c7345a6cdf 100644 --- a/utils/scsi/rbscsi.h +++ b/utils/scsi/rbscsi.h @@ -66,7 +66,20 @@ struct rb_scsi_raw_cmd_t }; /* open a device, returns a handle or NULL on error - * the caller can optionally provide an error printing function */ + * the caller can optionally provide an error printing function + * + * Linux: + * Path must be the block device, typically /dev/sdX and the program + * must have the permission to open it in read/write mode. + * + * Windows: + * If the path starts with '\', it will be use as-is. This allows to use + * paths such as \\.\PhysicalDriveX or \\.\ScsiX + * Alternatively, the code will try to map a logical drive (such as 'C:') to + * the correspoding physical drive. + * In any case, on recent windows, the program needs to be started with + * Administrator privileges. + */ rb_scsi_device_t rb_scsi_open(const char *path, unsigned flags, void *user, rb_scsi_printf_t printf); /* performs a raw transfer, returns !=0 on error */ -- cgit v1.2.3