diff options
author | Douglas Gilbert <dgilbert@interlog.com> | 2019-10-27 21:44:39 +0000 |
---|---|---|
committer | Douglas Gilbert <dgilbert@interlog.com> | 2019-10-27 21:44:39 +0000 |
commit | 29fbcc3d5124c2109c0c05aeba6d53d99cb9eba1 (patch) | |
tree | a1c0d32b6d5750795ac6a0d56a72aab4f2f7a05a /testing/sg_chk_asc.c | |
parent | ee26c8116cfc960af016b8ad81bb3f2fc9ab7d09 (diff) | |
download | sg3_utils-29fbcc3d5124c2109c0c05aeba6d53d99cb9eba1.tar.gz |
sg_logs: change '-ll' option to suppress subpages=0xff, apart from page 0x0,0xff; asc/ascq sync with asc-num.txt @t10 20191014; sg_chk_asc: tweak for LF terminated lines
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@834 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'testing/sg_chk_asc.c')
-rw-r--r-- | testing/sg_chk_asc.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/testing/sg_chk_asc.c b/testing/sg_chk_asc.c index dd320fd5..a7844441 100644 --- a/testing/sg_chk_asc.c +++ b/testing/sg_chk_asc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006-2018 Douglas Gilbert. + * Copyright (c) 2006-2019 Douglas Gilbert. * All rights reserved. * Use of this source code is governed by a BSD-style * license that can be found in the BSD_LICENSE file. @@ -27,7 +27,7 @@ * http://www.t10.org/lists/asc-num.txt */ -static const char * version_str = "1.07 20181207"; +static const char * version_str = "1.08 20191014"; #define MAX_LINE_LEN 1024 @@ -163,10 +163,9 @@ printf("\"%s\",\n", b); strncpy(b , line + offset, sizeof(b) - 1); b[sizeof(b) - 1] = '\0'; num = strlen(b); - if (0xd == b[num - 2]) { + if (0xd == b[num - 2]) b[num - 2] = '\0'; - b[num - 1] = '\0'; - } + b[num - 1] = '\0'; num = strlen(b); for (j = 0; j < num; ++j) b[j] = toupper(b[j]); |