aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--debian/changelog2
-rw-r--r--doc/sg3_utils.82
-rw-r--r--doc/sg_logs.815
-rw-r--r--doc/sg_ses.88
-rw-r--r--examples/sg__sat_set_features.c6
-rw-r--r--lib/sg_pt_linux.c6
-rw-r--r--lib/sg_pt_linux_nvme.c4
-rw-r--r--sg3_utils.spec2
-rw-r--r--testing/sg_scat_gath.cpp4
-rw-r--r--testing/sgh_dd.cpp12
11 files changed, 35 insertions, 29 deletions
diff --git a/ChangeLog b/ChangeLog
index 9ee0f357..38ed2787 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,7 +2,7 @@ Each utility has its own version number, date of last change and
some description at the top of its ".c" file. All utilities in the main
directory have their own "man" pages. There is also a sg3_utils man page.
-Changelog for sg3_utils-1.46 [20201114] [svn: r867]
+Changelog for sg3_utils-1.46 [20201207] [svn: r868]
- sg_rep_pip: report new provisioning initialization pattern cmd
- sg_turs: estimated time-to-ready [20-061r2]
- add --delay=MS option
@@ -39,6 +39,7 @@ Changelog for sg3_utils-1.46 [20201114] [svn: r867]
- fix crash in sg_f2hex_arr() when fname not found
- sg_lib: reprint cdb with illegal request sense key
- asc/ascq match asc-num.txt @t10 20200708 [spc6r02]
+ - gcc-10: suppress warnings
- remove space from end of source lines for git-svn
- testing/sg_mrq_testing: new, for blocking mrq usage
- testing/sgs_dd: add evfd flags and eventfd processing
diff --git a/debian/changelog b/debian/changelog
index 4a9f3e4a..b5ff68f2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,7 +2,7 @@ sg3-utils (1.46-0.1) unstable; urgency=low
* New upstream version
- -- Douglas Gilbert <dgilbert@interlog.com> Mon, 02 Nov 2020 22:00:00 -0500
+ -- Douglas Gilbert <dgilbert@interlog.com> Sat, 05 Dec 2020 18:00:00 -0500
sg3-utils (1.45-0.1) unstable; urgency=low
diff --git a/doc/sg3_utils.8 b/doc/sg3_utils.8
index a2411120..c4ab4569 100644
--- a/doc/sg3_utils.8
+++ b/doc/sg3_utils.8
@@ -1,4 +1,4 @@
-.TH SG3_UTILS "8" "November 2020" "sg3_utils\-1.46" SG3_UTILS
+.TH SG3_UTILS "8" "December 2020" "sg3_utils\-1.46" SG3_UTILS
.SH NAME
sg3_utils \- a package of utilities for sending SCSI commands
.SH SYNOPSIS
diff --git a/doc/sg_logs.8 b/doc/sg_logs.8
index 216f8d7e..014c8525 100644
--- a/doc/sg_logs.8
+++ b/doc/sg_logs.8
@@ -94,13 +94,14 @@ accepts 0, 1, 2 or 3 for the \fIPC\fR argument:
The default value is 1 (i.e. current cumulative values).
.TP
\fB\-e\fR, \fB\-\-enumerate\fR
-this option is used to output information held in internal tables about
-known log pages including their name, acronym and fields. If given, the
-\fIDEVICE\fR argument is ignored. When given once (e.g. '\-e') all known
-pages are listed, sorted in ascending acronym order (alphabetic). When
-given twice, vendor pages are excluded. When given three times, all known
-pages are listed, sorted in ascending numeric order listed; when given four
-times, vendor pages are excluded from the numeric order.
+this option is used to output information held in this utility's internal
+tables about known log pages including their name, acronym and fields. If
+given, the \fIDEVICE\fR argument is ignored. When given once (e.g. '\-e')
+all known pages are listed, sorted in ascending alphabetical acronym order.
+.br
+When given twice, vendor pages are excluded. When given three times, all
+known pages are listed, sorted in ascending numeric order listed; when given
+four times, vendor pages are excluded from the numeric order.
.br
The \fI\-\-filter=FL\fR and \fI\-\-verbose\fR options reduce the output
of the enumeration.
diff --git a/doc/sg_ses.8 b/doc/sg_ses.8
index d953e55b..e84e2b05 100644
--- a/doc/sg_ses.8
+++ b/doc/sg_ses.8
@@ -1,4 +1,4 @@
-.TH SG_SES "8" "February 2020" "sg3_utils\-1.45" SG3_UTILS
+.TH SG_SES "8" "November 2020" "sg3_utils\-1.45" SG3_UTILS
.SH NAME
sg_ses \- access a SCSI Enclosure Services (SES) device
.SH SYNOPSIS
@@ -164,8 +164,10 @@ If the enclosure sets the actual EIIOE field to 1 or more then this option has
no effect. It is recommended that HP JBOD users set \-\-eiioe=auto .
.TP
\fB\-e\fR, \fB\-\-enumerate\fR
-enumerate all known dpage names and SES elements when this option is given
-once.
+enumerate all known diagnostic page (dpage) names and SES elements that this
+utility recognizes plus the abbreviations accepted by this utility. Ignores
+\fIDEVICE\fR if it is given. Essentially it is dumping out tables held
+internally by this utility.
.br
If \fI\-\-enumerate\fR is given twice, then the recognised acronyms for the
\fI\-\-clear=STR\fR, \fI\-\-get=STR\fR and \fI\-\-set=STR\fR options are
diff --git a/examples/sg__sat_set_features.c b/examples/sg__sat_set_features.c
index fc7a8cc2..0b200477 100644
--- a/examples/sg__sat_set_features.c
+++ b/examples/sg__sat_set_features.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2018 Douglas Gilbert.
+ * Copyright (c) 2006-2020 Douglas Gilbert.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -56,9 +56,9 @@
#define ATA_SET_FEATURES 0xef
-#define EBUFF_SZ 256
+#define EBUFF_SZ 512
-static char * version_str = "1.05 20180220";
+static char * version_str = "1.06 20201125";
static struct option long_options[] = {
{"count", required_argument, 0, 'c'},
diff --git a/lib/sg_pt_linux.c b/lib/sg_pt_linux.c
index d5e01e90..a2eeb6da 100644
--- a/lib/sg_pt_linux.c
+++ b/lib/sg_pt_linux.c
@@ -7,7 +7,7 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
-/* sg_pt_linux version 1.49 20200820 */
+/* sg_pt_linux version 1.50 20201123 */
#include <stdio.h>
@@ -655,7 +655,7 @@ get_scsi_pt_cdb_buf(const struct sg_pt_base * vp)
{
const struct sg_pt_linux_scsi * ptp = &vp->impl;
- return (uint8_t *)ptp->io_hdr.request;
+ return (uint8_t *)(sg_uintptr_t)ptp->io_hdr.request;
}
void
@@ -880,7 +880,7 @@ get_scsi_pt_sense_buf(const struct sg_pt_base * vp)
{
const struct sg_pt_linux_scsi * ptp = &vp->impl;
- return (uint8_t *)ptp->io_hdr.response;
+ return (uint8_t *)(sg_uintptr_t)ptp->io_hdr.response;
}
int
diff --git a/lib/sg_pt_linux_nvme.c b/lib/sg_pt_linux_nvme.c
index d8868004..ea71c7b1 100644
--- a/lib/sg_pt_linux_nvme.c
+++ b/lib/sg_pt_linux_nvme.c
@@ -41,7 +41,7 @@
* MA 02110-1301, USA.
*/
-/* sg_pt_linux_nvme version 1.13 20200501 */
+/* sg_pt_linux_nvme version 1.14 20201123 */
/* This file contains a small "SPC-only" SNTL to support the SES pass-through
* of SEND DIAGNOSTIC and RECEIVE DIAGNOSTIC RESULTS through NVME-MI
@@ -1429,7 +1429,7 @@ sntl_do_nvm_cmd(struct sg_pt_linux_scsi * ptp, struct sg_nvme_user_io * iop,
struct sg_nvme_passthru_cmd nvme_pt_cmd;
struct sg_nvme_passthru_cmd *cmdp = &nvme_pt_cmd;
- void * dp = (void *)iop->addr;
+ void * dp = (void *)(sg_uintptr_t)iop->addr;
memset(cmdp, 0, sizeof(*cmdp));
cmdp->opcode = iop->opcode;
diff --git a/sg3_utils.spec b/sg3_utils.spec
index e2146319..9dd875cc 100644
--- a/sg3_utils.spec
+++ b/sg3_utils.spec
@@ -84,7 +84,7 @@ fi
%{_libdir}/*.la
%changelog
-* Mon Nov 02 2020 - dgilbert at interlog dot com
+* Sat Dec 05 2020 - dgilbert at interlog dot com
- track t10 changes
* sg3_utils-1.46
diff --git a/testing/sg_scat_gath.cpp b/testing/sg_scat_gath.cpp
index 91e9d37a..b5edc481 100644
--- a/testing/sg_scat_gath.cpp
+++ b/testing/sg_scat_gath.cpp
@@ -6,7 +6,7 @@
*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Version 1.01 [20200820]
+ * Version 1.02 [20201124]
*/
// C headers
@@ -14,6 +14,8 @@
#include <stdint.h>
#include <string.h>
#include <limits.h>
+#include <ctype.h>
+#include <errno.h>
#define __STDC_FORMAT_MACROS 1
#include <inttypes.h>
diff --git a/testing/sgh_dd.cpp b/testing/sgh_dd.cpp
index 9a53b98a..d0b8ab29 100644
--- a/testing/sgh_dd.cpp
+++ b/testing/sgh_dd.cpp
@@ -36,7 +36,7 @@
* renamed [20181221]
*/
-static const char * version_str = "1.96 20201019";
+static const char * version_str = "1.97 20201124";
#define _XOPEN_SOURCE 600
#ifndef _GNU_SOURCE
@@ -839,7 +839,7 @@ tsafe_strerror(int code, char * ebp)
strncpy(ebp, cp, STRERR_BUFF_LEN);
pthread_mutex_unlock(&strerr_mut);
- ebp[STRERR_BUFF_LEN - 1] = '\0';
+ ebp[strlen(ebp) - 1] = '\0';
return ebp;
}
@@ -848,7 +848,7 @@ tsafe_strerror(int code, char * ebp)
* ISBN 0-201-63392-2 . [Highly recommended book.] Changed __FILE__
* to __func__ */
#define err_exit(code,text) do { \
- char strerr_buff[STRERR_BUFF_LEN]; \
+ char strerr_buff[STRERR_BUFF_LEN + 1]; \
pr2serr("%s at \"%s\":%d: %s\n", \
text, __func__, __LINE__, tsafe_strerror(code, strerr_buff)); \
exit(1); \
@@ -1684,7 +1684,7 @@ fini:
if ((1 == rep->mmap_active) && (rep->mmap_len > 0)) {
if (munmap(rep->buffp, rep->mmap_len) < 0) {
int err = errno;
- char bb[64];
+ char bb[STRERR_BUFF_LEN + 1];
pr2serr_lk("thread=%d: munmap() failed: %s\n", rep->id,
tsafe_strerror(err, bb));
@@ -1748,7 +1748,7 @@ normal_in_rd(Rq_elem * rep, int blocks)
bool stop_after_write = false;
bool same_fds = clp->in_flags.same_fds || clp->out_flags.same_fds;
int res;
- char strerr_buff[STRERR_BUFF_LEN];
+ char strerr_buff[STRERR_BUFF_LEN + 1];
if (clp->verbose > 4)
pr2serr_lk("%s: tid=%d: iblk=%" PRIu64 ", blocks=%d\n", __func__,
@@ -1830,7 +1830,7 @@ normal_out_wr(Rq_elem * rep, int blocks)
{
int res;
struct global_collection * clp = rep->clp;
- char strerr_buff[STRERR_BUFF_LEN];
+ char strerr_buff[STRERR_BUFF_LEN + 1];
/* enters holding out_mutex */
if (clp->verbose > 4)