aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2008-06-04 18:56:15 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2008-06-04 18:56:15 +0000
commit1ed38622e036161089f63939413f673c79ac81f0 (patch)
treecfafc43e27e6e88e7e3da3e36dcee3c7859d0fcf /examples
parente435ab5aeb5b54382ded4a6525c2b5f4c4956f72 (diff)
downloadsg3_utils-1ed38622e036161089f63939413f673c79ac81f0.tar.gz
remove trailing spaces from various source files
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@178 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'examples')
-rw-r--r--examples/scsi_inquiry.c10
-rw-r--r--examples/sg_simple2.c10
-rw-r--r--examples/sg_simple4.c4
3 files changed, 12 insertions, 12 deletions
diff --git a/examples/scsi_inquiry.c b/examples/scsi_inquiry.c
index aae8e374..80222950 100644
--- a/examples/scsi_inquiry.c
+++ b/examples/scsi_inquiry.c
@@ -19,16 +19,16 @@
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
- This program does a SCSI inquiry command on the given device and
+ This program does a SCSI inquiry command on the given device and
outputs some of the result. This program highlights the use of the
- SCSI_IOCTL_SEND_COMMAND ioctl. This should be able to be applied to
+ SCSI_IOCTL_SEND_COMMAND ioctl. This should be able to be applied to
any SCSI device file descriptor (not just one related to sg). [Whether
this is a good idea on a disk while it is mounted is debatable.
No detrimental effects when this was tested ...]
Version 0.14 20011218
*/
-
+
typedef struct my_scsi_ioctl_command {
unsigned int inlen; /* _excluding_ scsi command length */
@@ -80,7 +80,7 @@ int main(int argc, char * argv[])
printf(" scsi_inquiry -n /dev/scd0\n");
return 1;
}
-
+
if (do_nonblock)
oflags = O_NONBLOCK;
s_fd = open(file_name, oflags | O_RDWR);
@@ -116,7 +116,7 @@ int main(int argc, char * argv[])
}
else if (res < 0)
perror("scsi_inquiry: SCSI_IOCTL_SEND_COMMAND err");
- else
+ else
printf("scsi_inquiry: SCSI_IOCTL_SEND_COMMAND status=0x%x\n", res);
res = close(s_fd);
diff --git a/examples/sg_simple2.c b/examples/sg_simple2.c
index 249c44bb..a0da0e4f 100644
--- a/examples/sg_simple2.c
+++ b/examples/sg_simple2.c
@@ -77,7 +77,7 @@ int main(int argc, char * argv[])
printf("Usage: 'sg_simple2 [-x] <sg_device>'\n");
return 1;
}
-
+
/* N.B. An access mode of O_RDWR is required for some SCSI commands */
if ((sg_fd = open(file_name, O_RDONLY)) < 0) {
snprintf(ebuff, EBUFF_SZ,
@@ -87,12 +87,12 @@ int main(int argc, char * argv[])
}
/* Just to be safe, check we have a new sg device by trying an ioctl */
if ((ioctl(sg_fd, SG_GET_VERSION_NUM, &k) < 0) || (k < 30000)) {
- printf("sg_simple2: %s doesn't seem to be an new sg device\n",
+ printf("sg_simple2: %s doesn't seem to be an new sg device\n",
file_name);
close(sg_fd);
return 1;
}
-
+
/* Prepare INQUIRY command */
memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
io_hdr.interface_id = 'S';
@@ -145,7 +145,7 @@ int main(int argc, char * argv[])
if (do_extra)
printf("INQUIRY duration=%u millisecs, resid=%d, msg_status=%d\n",
io_hdr.duration, io_hdr.resid, (int)io_hdr.msg_status);
-
+
/* Prepare TEST UNIT READY command */
memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
io_hdr.interface_id = 'S';
@@ -178,7 +178,7 @@ int main(int argc, char * argv[])
else if (io_hdr.host_status)
printf("TEST UNIT READY host_status=0x%x\n", io_hdr.host_status);
else if (io_hdr.driver_status)
- printf("TEST UNIT READY driver_status=0x%x\n",
+ printf("TEST UNIT READY driver_status=0x%x\n",
io_hdr.driver_status);
else
printf("TEST UNIT READY unexpected error\n");
diff --git a/examples/sg_simple4.c b/examples/sg_simple4.c
index df36f3f0..8b633ab2 100644
--- a/examples/sg_simple4.c
+++ b/examples/sg_simple4.c
@@ -94,7 +94,7 @@ int main(int argc, char * argv[])
close(sg_fd);
return 1;
}
-
+
/* since I know this program will only read from inqBuff then I use
PROT_READ rather than PROT_READ | PROT_WRITE */
inqBuff = (unsigned char *)mmap(NULL, 8000, PROT_READ | PROT_WRITE,
@@ -198,7 +198,7 @@ int main(int argc, char * argv[])
printf("Test Unit Ready failed so unit may _not_ be ready!\n");
if (do_extra)
- printf("TEST UNIT READY duration=%u millisecs, resid=%d, "
+ printf("TEST UNIT READY duration=%u millisecs, resid=%d, "
"msg_status=%d\n",
io_hdr.duration, io_hdr.resid, (int)io_hdr.msg_status);