diff options
author | ken <ken@FreeBSD.org> | 2016-12-16 20:24:47 +0000 |
---|---|---|
committer | ken <ken@FreeBSD.org> | 2016-12-16 20:24:47 +0000 |
commit | bad6a620da0682cbcda223b7ec0b7f2a097ebbd0 (patch) | |
tree | 3d510eea0e868c81788a9e5f0a17c3ad8a7276c9 /sbin/camcontrol/Makefile | |
parent | a1b67611251f0d9870e08f509977a3849ba91574 (diff) | |
download | FreeBSD-src-bad6a620da0682cbcda223b7ec0b7f2a097ebbd0.zip FreeBSD-src-bad6a620da0682cbcda223b7ec0b7f2a097ebbd0.tar.gz |
MFC r309374, r309513, r309839, r309840:
------------------------------------------------------------------------
r309374 | ken | 2016-12-01 15:20:27 -0700 (Thu, 01 Dec 2016) | 41 lines
Add SCSI REPORT TIMESTAMP and SET TIMESTAMP support.
This adds support to camcontrol(8) and libcam(3) for getting and setting
the time on SCSI protocol drives. This is more commonly found on tape
drives, but is a SPC (SCSI Primary Commands) command, and may be found
on any device that speaks SCSI.
The new camcontrol timestamp subcommand allows getting the current device
time or setting the time to the current system time or any arbitrary time.
sbin/camcontrol/Makefile:
Add timestamp.c.
sbin/camcontrol/camcontrol.8:
Document the new timestamp subcommand.
sbin/camcontrol/camcontrol.c:
Add the timestamp subcommand to camcontrol.
sbin/camcontrol/camcontrol.h:
Add the timestamp() function prototype.
sbin/camcontrol/timestamp.c:
Timestamp setting and reporting functionality.
sys/cam/scsi/scsi_all.c:
Add two new CCB building functions, scsi_set_timestamp() and
scsi_report_timestamp(). Also, add a new helper function,
scsi_create_timestamp().
sys/cam/scsi/scsi_all.h:
Add CDB and parameter data for the the set and report timestamp
commands.
Add function declarations for the new CCB building and helper
functions.
Submitted by: Sam Klopsch
Sponsored by: Spectra Logic
------------------------------------------------------------------------
r309513 | adrian | 2016-12-03 13:35:39 -0700 (Sat, 03 Dec 2016) | 7 lines
[camcontrol] init ts=0 to quieten gcc.
It "looks" like ts is set to something on success, and not modified on
error.
Checked on IRC with: cem
------------------------------------------------------------------------
r309839 | ngie | 2016-12-10 16:26:34 -0700 (Sat, 10 Dec 2016) | 6 lines
free/NULL out variables prior to calling strdup to avoid leaking memory
if arguments are specified more than once with "camcontrol timestamp".
CID: 1366829, 1366831
------------------------------------------------------------------------
r309840 | ngie | 2016-12-10 16:58:14 -0700 (Sat, 10 Dec 2016) | 8 lines
Cut to the chase and just call free instead of free(x) + x = NULL
NULLing out x wasn't required as the memory was immediately scribbled
over with strdup in the following call.
Submitted by: imp
------------------------------------------------------------------------
Diffstat (limited to 'sbin/camcontrol/Makefile')
-rw-r--r-- | sbin/camcontrol/Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/camcontrol/Makefile b/sbin/camcontrol/Makefile index dc9320a..a1ad693 100644 --- a/sbin/camcontrol/Makefile +++ b/sbin/camcontrol/Makefile @@ -4,7 +4,7 @@ PACKAGE=runtime PROG= camcontrol SRCS= camcontrol.c util.c .if !defined(RELEASE_CRUNCH) -SRCS+= attrib.c epc.c fwdownload.c modeedit.c persist.c progress.c zone.c +SRCS+= attrib.c epc.c fwdownload.c modeedit.c persist.c progress.c timestamp.c zone.c .else CFLAGS+= -DMINIMALISTIC .endif |