aboutsummaryrefslogtreecommitdiff
path: root/src/sg_readcap.c
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2008-05-14 13:57:35 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2008-05-14 13:57:35 +0000
commit27bf7335c8f4bf7b3eff1801892efc2bf9bcb3e7 (patch)
treea2dd22007216ec254bad2bfcf7a3652fc9a4d80e /src/sg_readcap.c
parent225607ea7a970aaee3152bb0b085352d2decc854 (diff)
downloadsg3_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_readcap.c')
-rw-r--r--src/sg_readcap.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/sg_readcap.c b/src/sg_readcap.c
index ff811bec..573ca3ff 100644
--- a/src/sg_readcap.c
+++ b/src/sg_readcap.c
@@ -362,6 +362,12 @@ int main(int argc, char * argv[])
usage_for(&opts);
return SG_LIB_SYNTAX_ERROR;
}
+ if (opts.do_raw) {
+ if (sg_set_binary_mode(STDOUT_FILENO) < 0) {
+ perror("sg_set_binary_mode");
+ return SG_LIB_FILE_ERROR;
+ }
+ }
memset(resp_buff, 0, sizeof(resp_buff));