diff options
author | Douglas Gilbert <dgilbert@interlog.com> | 2008-05-14 13:57:35 +0000 |
---|---|---|
committer | Douglas Gilbert <dgilbert@interlog.com> | 2008-05-14 13:57:35 +0000 |
commit | 27bf7335c8f4bf7b3eff1801892efc2bf9bcb3e7 (patch) | |
tree | a2dd22007216ec254bad2bfcf7a3652fc9a4d80e /src/sg_luns.c | |
parent | 225607ea7a970aaee3152bb0b085352d2decc854 (diff) | |
download | sg3_utils-27bf7335c8f4bf7b3eff1801892efc2bf9bcb3e7.tar.gz |
sg_set_binary_mode() added for MinGW to stop LF to CR-LF conversion
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@170 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'src/sg_luns.c')
-rw-r--r-- | src/sg_luns.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/sg_luns.c b/src/sg_luns.c index a2d573a1..e2dd7c6b 100644 --- a/src/sg_luns.c +++ b/src/sg_luns.c @@ -48,7 +48,7 @@ * This program issues the SCSI command REPORT LUNS to the given SCSI device. */ -static char * version_str = "1.13 20080406"; +static char * version_str = "1.14 20080510"; #define MAX_RLUNS_BUFF_LEN (1024 * 64) #define DEF_RLUNS_BUFF_LEN MAX_RLUNS_BUFF_LEN @@ -312,6 +312,12 @@ main(int argc, char * argv[]) } if (0 == maxlen) maxlen = DEF_RLUNS_BUFF_LEN; + if (do_raw) { + if (sg_set_binary_mode(STDOUT_FILENO) < 0) { + perror("sg_set_binary_mode"); + return SG_LIB_FILE_ERROR; + } + } sg_fd = sg_cmds_open_device(device_name, 0 /* rw */, verbose); if (sg_fd < 0) { |