Skip to content

Commit

Permalink
sync to upstream sdparm svn rev 376
Browse files Browse the repository at this point in the history
See ChangeLog file for pre-release sdparm-1.13 [20230408]
  • Loading branch information
doug-gilbert committed Apr 8, 2023
1 parent 793b649 commit 6dc9cfb
Show file tree
Hide file tree
Showing 11 changed files with 703 additions and 21 deletions.
5 changes: 3 additions & 2 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ The version number is hardcoded into sdparm.c (in a C string);
the rpm spec file: sdparm.spec ; the debian/changelog file;
and the configure.ac file (in the AC_INIT item).

ChangeLog for pre-release sdparm-1.13 [20230329] [svn: r375]
ChangeLog for pre-release sdparm-1.13 [20230408] [svn: r376]
- add --json[=JO] and --js-file=JFN options
- apart from with a real device, json output can be
requested with --enumerate or --inhex=FN
Expand All @@ -23,7 +23,8 @@ ChangeLog for pre-release sdparm-1.13 [20230329] [svn: r375]
- act on LAST bit in App tag mpage descriptors to stop
output of further descriptors, override this
truncation with --flexible option
- point svn:externals to sg3_utils revision 1020
- experimental: add NetBSD support
- point svn:externals to sg3_utils revision 1021
- autoconf: upgrade version 2.70 to 2.71; automake upgrade
to version 1.16.5
- remove the imtermediate files generated by ./autogen.sh
Expand Down
7 changes: 7 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ case "${host}" in
*-*-solaris*)
AC_SUBST([os_deps], ['sg_pt_solaris.o'])
AC_DEFINE_UNQUOTED(SG_LIB_SOLARIS, 1, [sdparm on Solaris]);;
*-*-netbsd*)
AC_SUBST([os_deps], ['sg_pt_netbsd.o'])
AC_DEFINE_UNQUOTED(SG_LIB_NETBSD, 1, [sdparm on NetBSD]);;
*-*-openbsd*)
AC_DEFINE_UNQUOTED(SG_LIB_OPENBSD, 1, [sdparm on OpenBSD]);;
*-*-osf*)
AC_SUBST([os_deps], ['sg_pt_osf1.o'])
AC_DEFINE_UNQUOTED(SG_LIB_OSF1, 1, [sdparm on Tru64 UNIX]);;
Expand All @@ -75,6 +80,8 @@ esac
# Define platform-specific symbol.
AM_CONDITIONAL(OS_FREEBSD, [echo $host_os | grep 'freebsd' > /dev/null])
AM_CONDITIONAL(OS_LINUX, [echo $host_os | grep '^linux' > /dev/null])
AM_CONDITIONAL(OS_NETBSD, [echo $host_os | grep '^netbsd' > /dev/null])
AM_CONDITIONAL(OS_OPENBSD, [echo $host_os | grep '^openbsd' > /dev/null])
AM_CONDITIONAL(OS_OSF, [echo $host_os | grep '^osf' > /dev/null])
AM_CONDITIONAL(OS_SOLARIS, [echo $host_os | grep '^solaris' > /dev/null])
AM_CONDITIONAL(OS_WIN32_MINGW, [echo $host_os | grep '^mingw' > /dev/null])
Expand Down
2 changes: 1 addition & 1 deletion debian/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ sdparm (1.13-0.1) unstable; urgency=low

* see ChangeLog

-- Douglas Gilbert <[email protected]> Wed, 20 Mar 2023 14:00:00 -0400
-- Douglas Gilbert <[email protected]> Sat, 08 Apr 2023 13:00:00 -0400

sdparm (1.12-0.1) unstable; urgency=low

Expand Down
2 changes: 1 addition & 1 deletion doc/sdparm.8
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH SDPARM "8" "March 2023" "sdparm\-1.13" SDPARM
.TH SDPARM "8" "April 2023" "sdparm\-1.13" SDPARM
.SH NAME
sdparm \- access SCSI modes pages; read VPD pages; send simple SCSI commands
.SH SYNOPSIS
Expand Down
2 changes: 1 addition & 1 deletion doc/sdparm_json.8
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH SDPARM_JSON "8" "March 2023" "sdparm\-1.13" SDPARM
.TH SDPARM_JSON "8" "April 2023" "sdparm\-1.13" SDPARM
.SH NAME
sdparm_json \- JSON output options for the sdparm utility
.SH SYNOPSIS
Expand Down
2 changes: 1 addition & 1 deletion lib/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ endif
endif

if OS_NETBSD
libsgutils2_la_SOURCES += sg_pt_dummy.c
libsgutils2_la_SOURCES += sg_pt_netbsd.c
endif

if OS_OPENBSD
Expand Down
26 changes: 13 additions & 13 deletions lib/sg_pt_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -489,20 +489,20 @@ clear_scsi_pt_obj(struct sg_pt_base * vp)
void
partial_clear_scsi_pt_obj(struct sg_pt_base * vp)
{
struct sg_pt_linux_scsi * ptp = &vp->impl;
if (vp) {
struct sg_pt_linux_scsi * ptp = &vp->impl;

if (NULL == ptp)
return;
ptp->in_err = 0;
ptp->os_err = 0;
ptp->io_hdr.device_status = 0;
ptp->io_hdr.transport_status = 0;
ptp->io_hdr.driver_status = 0;
ptp->io_hdr.din_xferp = 0;
ptp->io_hdr.din_xfer_len = 0;
ptp->io_hdr.dout_xferp = 0;
ptp->io_hdr.dout_xfer_len = 0;
ptp->nvme_result = 0;
ptp->in_err = 0;
ptp->os_err = 0;
ptp->io_hdr.device_status = 0;
ptp->io_hdr.transport_status = 0;
ptp->io_hdr.driver_status = 0;
ptp->io_hdr.din_xferp = 0;
ptp->io_hdr.din_xfer_len = 0;
ptp->io_hdr.dout_xferp = 0;
ptp->io_hdr.dout_xfer_len = 0;
ptp->nvme_result = 0;
}
}

#ifndef SG_SET_GET_EXTENDED
Expand Down
Loading

0 comments on commit 6dc9cfb

Please sign in to comment.