28db0a5e74
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 MFC After: 2 weeks
19 lines
356 B
Makefile
19 lines
356 B
Makefile
# $FreeBSD$
|
|
|
|
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 timestamp.c zone.c
|
|
.else
|
|
CFLAGS+= -DMINIMALISTIC
|
|
.endif
|
|
# This is verboten
|
|
.if ${MACHINE_CPUARCH} == "arm"
|
|
WARNS?= 3
|
|
.endif
|
|
LIBADD= cam sbuf util
|
|
MAN= camcontrol.8
|
|
|
|
.include <bsd.prog.mk>
|