From 252086533f8af0736c2a4987cd70a44366837ec1 Mon Sep 17 00:00:00 2001 From: Douglas Gilbert Date: Thu, 22 Feb 2018 07:00:28 +0000 Subject: 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 --- src/sg_get_lba_status.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/sg_get_lba_status.c') diff --git a/src/sg_get_lba_status.c b/src/sg_get_lba_status.c index 3a4f2020..aaff98e6 100644 --- a/src/sg_get_lba_status.c +++ b/src/sg_get_lba_status.c @@ -32,7 +32,7 @@ * device. */ -static const char * version_str = "1.12 20171005"; +static const char * version_str = "1.13 20180219"; #ifndef UINT32_MAX #define UINT32_MAX ((uint32_t)-1) @@ -41,8 +41,8 @@ static const char * version_str = "1.12 20171005"; #define MAX_GLBAS_BUFF_LEN (1024 * 1024) #define DEF_GLBAS_BUFF_LEN 24 -static unsigned char glbasBuff[DEF_GLBAS_BUFF_LEN]; -static unsigned char * glbasBuffp = glbasBuff; +static uint8_t glbasBuff[DEF_GLBAS_BUFF_LEN]; +static uint8_t * glbasBuffp = glbasBuff; static struct option long_options[] = { @@ -126,7 +126,7 @@ dStrRaw(const char * str, int len) * the number of blocks and returns the provisioning status, -1 for error. */ static int -decode_lba_status_desc(const unsigned char * bp, uint64_t * slbap, +decode_lba_status_desc(const uint8_t * bp, uint64_t * slbap, uint32_t * blocksp, uint8_t * add_statusp) { uint32_t blocks; @@ -166,7 +166,7 @@ main(int argc, char * argv[]) bool do_raw = false; bool o_readonly = false; const char * device_name = NULL; - const unsigned char * bp; + const uint8_t * bp; int ret = 0; uint8_t add_status; @@ -271,7 +271,7 @@ main(int argc, char * argv[]) return SG_LIB_SYNTAX_ERROR; } if (maxlen > DEF_GLBAS_BUFF_LEN) { - glbasBuffp = (unsigned char *)calloc(maxlen, 1); + glbasBuffp = (uint8_t *)calloc(maxlen, 1); if (NULL == glbasBuffp) { pr2serr("unable to allocate %d bytes on heap\n", maxlen); return SG_LIB_SYNTAX_ERROR; -- cgit v1.2.3