diff options
author | Douglas Gilbert <dgilbert@interlog.com> | 2018-02-22 07:00:28 +0000 |
---|---|---|
committer | Douglas Gilbert <dgilbert@interlog.com> | 2018-02-22 07:00:28 +0000 |
commit | 252086533f8af0736c2a4987cd70a44366837ec1 (patch) | |
tree | 1f9245e247673fdb6ebea13b9aa559e1f869d78c /examples/sg__sat_set_features.c | |
parent | 39ea1b548f21c006c311ace897b221b100bfa88d (diff) | |
download | sg3_utils-252086533f8af0736c2a4987cd70a44366837ec1.tar.gz |
sg_lib: add sg_if_can2stdout(); use uint8_t instead of unsigned char; Windows pass-through work
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@754 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'examples/sg__sat_set_features.c')
-rw-r--r-- | examples/sg__sat_set_features.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/sg__sat_set_features.c b/examples/sg__sat_set_features.c index 215d2351..fc7a8cc2 100644 --- a/examples/sg__sat_set_features.c +++ b/examples/sg__sat_set_features.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006-2016 Douglas Gilbert. + * Copyright (c) 2006-2018 Douglas Gilbert. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -58,7 +58,7 @@ #define EBUFF_SZ 256 -static char * version_str = "1.04 20160528"; +static char * version_str = "1.05 20180220"; static struct option long_options[] = { {"count", required_argument, 0, 'c'}, @@ -100,13 +100,13 @@ void usage() int main(int argc, char * argv[]) { int sg_fd, c, k; - unsigned char apt_cdb[SAT_ATA_PASS_THROUGH16_LEN] = + uint8_t apt_cdb[SAT_ATA_PASS_THROUGH16_LEN] = {SAT_ATA_PASS_THROUGH16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; sg_io_hdr_t io_hdr; char device_name[256]; char ebuff[EBUFF_SZ]; - unsigned char sense_buffer[64]; + uint8_t sense_buffer[64]; int count = 0; int feature = 0; int lba = 0; @@ -117,7 +117,7 @@ int main(int argc, char * argv[]) int t_dir = 1; /* 0 -> to device, 1 -> from device */ int byte_block = 1; /* 0 -> bytes, 1 -> 512 byte blocks */ int t_length = 0; /* 0 -> no data transferred, 2 -> sector count */ - const unsigned char * bp = NULL; + const uint8_t * bp = NULL; memset(device_name, 0, sizeof(device_name)); while (1) { |