head	1.23;
access;
symbols
	RELENG_8_4:1.23.0.2
	RELENG_9_1_0_RELEASE:1.19.2.2.2.2
	RELENG_9_1:1.19.2.2.0.2
	RELENG_9_1_BP:1.19.2.2
	RELENG_8_3_0_RELEASE:1.17.10.1.8.1
	RELENG_8_3:1.17.10.1.0.8
	RELENG_8_3_BP:1.17.10.1
	RELENG_9_0_0_RELEASE:1.19.2.1.2.1
	RELENG_9_0:1.19.2.1.0.2
	RELENG_9_0_BP:1.19.2.1
	RELENG_9:1.19.0.2
	RELENG_9_BP:1.19
	RELENG_7_4_0_RELEASE:1.17.14.1
	RELENG_8_2_0_RELEASE:1.17.10.1.6.1
	RELENG_7_4:1.17.0.14
	RELENG_7_4_BP:1.17
	RELENG_8_2:1.17.10.1.0.6
	RELENG_8_2_BP:1.17.10.1
	RELENG_8_1_0_RELEASE:1.17.10.1.4.1
	RELENG_8_1:1.17.10.1.0.4
	RELENG_8_1_BP:1.17.10.1
	RELENG_7_3_0_RELEASE:1.17.12.1
	RELENG_7_3:1.17.0.12
	RELENG_7_3_BP:1.17
	RELENG_8_0_0_RELEASE:1.17.10.1.2.1
	RELENG_8_0:1.17.10.1.0.2
	RELENG_8_0_BP:1.17.10.1
	RELENG_8:1.17.0.10
	RELENG_8_BP:1.17
	RELENG_7_2_0_RELEASE:1.17.8.1
	RELENG_7_2:1.17.0.8
	RELENG_7_2_BP:1.17
	RELENG_7_1_0_RELEASE:1.17.6.1
	RELENG_6_4_0_RELEASE:1.16.8.1.4.1
	RELENG_7_1:1.17.0.6
	RELENG_7_1_BP:1.17
	RELENG_6_4:1.16.8.1.0.4
	RELENG_6_4_BP:1.16.8.1
	RELENG_7_0_0_RELEASE:1.17
	RELENG_6_3_0_RELEASE:1.16.8.1
	RELENG_7_0:1.17.0.4
	RELENG_7_0_BP:1.17
	RELENG_6_3:1.16.8.1.0.2
	RELENG_6_3_BP:1.16.8.1
	RELENG_7:1.17.0.2
	RELENG_7_BP:1.17
	RELENG_6_2_0_RELEASE:1.16
	RELENG_6_2:1.16.0.16
	RELENG_6_2_BP:1.16
	RELENG_5_5_0_RELEASE:1.16
	RELENG_5_5:1.16.0.14
	RELENG_5_5_BP:1.16
	RELENG_6_1_0_RELEASE:1.16
	RELENG_6_1:1.16.0.12
	RELENG_6_1_BP:1.16
	RELENG_6_0_0_RELEASE:1.16
	RELENG_6_0:1.16.0.10
	RELENG_6_0_BP:1.16
	RELENG_6:1.16.0.8
	RELENG_6_BP:1.16
	RELENG_5_4_0_RELEASE:1.16
	RELENG_5_4:1.16.0.6
	RELENG_5_4_BP:1.16
	RELENG_4_11_0_RELEASE:1.3.2.5
	RELENG_4_11:1.3.2.5.0.12
	RELENG_4_11_BP:1.3.2.5
	RELENG_5_3_0_RELEASE:1.16
	RELENG_5_3:1.16.0.4
	RELENG_5_3_BP:1.16
	RELENG_5:1.16.0.2
	RELENG_5_BP:1.16
	RELENG_4_10_0_RELEASE:1.3.2.5
	RELENG_4_10:1.3.2.5.0.10
	RELENG_4_10_BP:1.3.2.5
	RELENG_5_2_1_RELEASE:1.15
	RELENG_5_2_0_RELEASE:1.15
	RELENG_5_2:1.15.0.2
	RELENG_5_2_BP:1.15
	RELENG_4_9_0_RELEASE:1.3.2.5
	RELENG_4_9:1.3.2.5.0.8
	RELENG_4_9_BP:1.3.2.5
	RELENG_5_1_0_RELEASE:1.13
	RELENG_5_1:1.13.0.2
	RELENG_5_1_BP:1.13
	RELENG_4_8_0_RELEASE:1.3.2.5
	RELENG_4_8:1.3.2.5.0.6
	RELENG_4_8_BP:1.3.2.5
	RELENG_5_0_0_RELEASE:1.11
	RELENG_5_0:1.11.0.2
	RELENG_5_0_BP:1.11
	RELENG_4_7_0_RELEASE:1.3.2.5
	RELENG_4_7:1.3.2.5.0.4
	RELENG_4_7_BP:1.3.2.5
	RELENG_4_6_2_RELEASE:1.3.2.5
	RELENG_4_6_1_RELEASE:1.3.2.5
	RELENG_4_6_0_RELEASE:1.3.2.5
	RELENG_4_6:1.3.2.5.0.2
	RELENG_4_6_BP:1.3.2.5
	RELENG_4_5_0_RELEASE:1.3.2.3
	RELENG_4_5:1.3.2.3.0.2
	RELENG_4_5_BP:1.3.2.3
	RELENG_4_4_0_RELEASE:1.3.2.2
	RELENG_4_4:1.3.2.2.0.2
	RELENG_4_4_BP:1.3.2.2
	RELENG_4_3_0_RELEASE:1.3.2.1
	RELENG_4_3:1.3.2.1.0.2
	RELENG_4_3_BP:1.3.2.1
	RELENG_4_2_0_RELEASE:1.3.2.1
	RELENG_4_1_1_RELEASE:1.3.2.1
	PRE_SMPNG:1.4
	RELENG_4_1_0_RELEASE:1.3
	RELENG_3_5_0_RELEASE:1.1.2.1
	RELENG_4_0_0_RELEASE:1.3
	RELENG_4:1.3.0.2
	RELENG_4_BP:1.3
	RELENG_3_4_0_RELEASE:1.1.2.1
	RELENG_3_3_0_RELEASE:1.1.2.1
	RELENG_3_2_PAO:1.1.0.4
	RELENG_3_2_PAO_BP:1.1
	RELENG_3_2_0_RELEASE:1.1
	RELENG_3_1_0_RELEASE:1.1
	RELENG_3:1.1.0.2
	RELENG_3_BP:1.1
	RELENG_3_0_0_RELEASE:1.1;
locks; strict;
comment	@# @;


1.23
date	2012.11.17.01.50.18;	author svnexp;	state Exp;
branches
	1.23.2.1;
next	1.22;

1.22
date	2012.06.20.00.17.29;	author scottl;	state Exp;
branches;
next	1.21;

1.21
date	2012.01.29.09.12.34;	author nyan;	state Exp;
branches;
next	1.20;

1.20
date	2011.11.25.04.03.37;	author emaste;	state Exp;
branches;
next	1.19;

1.19
date	2010.08.23.22.24.11;	author imp;	state Exp;
branches
	1.19.2.1;
next	1.18;

1.18
date	2009.10.19.16.00.24;	author ru;	state Exp;
branches;
next	1.17;

1.17
date	2007.09.08.20.24.12;	author ken;	state Exp;
branches
	1.17.2.1
	1.17.6.1
	1.17.8.1
	1.17.10.1
	1.17.12.1
	1.17.14.1;
next	1.16;

1.16
date	2004.05.14.13.31.21;	author cognet;	state Exp;
branches
	1.16.8.1;
next	1.15;

1.15
date	2003.08.05.09.19.07;	author johan;	state Exp;
branches;
next	1.14;

1.14
date	2003.06.14.05.28.00;	author ken;	state Exp;
branches;
next	1.13;

1.13
date	2003.05.02.06.56.32;	author obrien;	state Exp;
branches;
next	1.12;

1.12
date	2003.02.20.21.07.59;	author johan;	state Exp;
branches;
next	1.11;

1.11
date	2002.01.24.16.53.08;	author ru;	state Exp;
branches;
next	1.10;

1.10
date	2002.01.18.22.17.35;	author joerg;	state Exp;
branches;
next	1.9;

1.9
date	2002.01.17.20.26.14;	author joerg;	state Exp;
branches;
next	1.8;

1.8
date	2001.12.04.02.19.44;	author obrien;	state Exp;
branches;
next	1.7;

1.7
date	2001.03.27.05.45.00;	author ken;	state Exp;
branches;
next	1.6;

1.6
date	2001.03.26.14.32.57;	author ru;	state Exp;
branches;
next	1.5;

1.5
date	2001.03.20.18.12.58;	author ru;	state Exp;
branches;
next	1.4;

1.4
date	2000.08.08.06.24.14;	author kbyanc;	state Exp;
branches;
next	1.3;

1.3
date	2000.01.21.23.18.08;	author mjacob;	state Exp;
branches
	1.3.2.1;
next	1.2;

1.2
date	99.06.18.00.41.33;	author ken;	state Exp;
branches;
next	1.1;

1.1
date	98.09.15.06.43.01;	author gibbs;	state Exp;
branches
	1.1.2.1;
next	;

1.23.2.1
date	2012.11.17.01.50.18;	author svnexp;	state dead;
branches;
next	1.23.2.2;

1.23.2.2
date	2013.03.28.13.03.31;	author svnexp;	state Exp;
branches;
next	;

1.19.2.1
date	2011.09.23.00.51.37;	author kensmith;	state Exp;
branches
	1.19.2.1.2.1;
next	1.19.2.2;

1.19.2.2
date	2012.06.29.03.37.23;	author scottl;	state Exp;
branches
	1.19.2.2.2.1;
next	1.19.2.3;

1.19.2.3
date	2012.11.17.11.36.30;	author svnexp;	state Exp;
branches;
next	;

1.19.2.1.2.1
date	2011.11.11.04.20.22;	author kensmith;	state Exp;
branches;
next	1.19.2.1.2.2;

1.19.2.1.2.2
date	2012.11.17.08.36.30;	author svnexp;	state Exp;
branches;
next	;

1.19.2.2.2.1
date	2012.08.05.23.54.33;	author kensmith;	state Exp;
branches;
next	1.19.2.2.2.2;

1.19.2.2.2.2
date	2012.11.17.08.47.20;	author svnexp;	state Exp;
branches;
next	;

1.17.2.1
date	2012.11.17.08.03.31;	author svnexp;	state Exp;
branches;
next	;

1.17.6.1
date	2008.11.25.02.59.29;	author kensmith;	state Exp;
branches;
next	;

1.17.8.1
date	2009.04.15.03.14.26;	author kensmith;	state Exp;
branches;
next	;

1.17.10.1
date	2009.08.03.08.13.06;	author kensmith;	state Exp;
branches
	1.17.10.1.2.1
	1.17.10.1.4.1
	1.17.10.1.6.1
	1.17.10.1.8.1;
next	1.17.10.2;

1.17.10.2
date	2012.11.17.10.36.15;	author svnexp;	state Exp;
branches;
next	;

1.17.10.1.2.1
date	2009.10.25.01.10.29;	author kensmith;	state Exp;
branches;
next	;

1.17.10.1.4.1
date	2010.06.14.02.09.06;	author kensmith;	state Exp;
branches;
next	;

1.17.10.1.6.1
date	2010.12.21.17.09.25;	author kensmith;	state Exp;
branches;
next	;

1.17.10.1.8.1
date	2012.03.03.06.15.13;	author kensmith;	state Exp;
branches;
next	1.17.10.1.8.2;

1.17.10.1.8.2
date	2012.11.17.08.24.55;	author svnexp;	state Exp;
branches;
next	;

1.17.12.1
date	2010.02.10.00.26.20;	author kensmith;	state Exp;
branches;
next	;

1.17.14.1
date	2010.12.21.17.10.29;	author kensmith;	state Exp;
branches;
next	1.17.14.2;

1.17.14.2
date	2012.11.17.08.16.53;	author svnexp;	state Exp;
branches;
next	;

1.16.8.1
date	2007.09.18.01.26.28;	author ken;	state Exp;
branches
	1.16.8.1.4.1;
next	1.16.8.2;

1.16.8.2
date	2012.11.17.07.41.13;	author svnexp;	state Exp;
branches;
next	;

1.16.8.1.4.1
date	2008.10.02.02.57.24;	author kensmith;	state Exp;
branches;
next	;

1.3.2.1
date	2000.08.14.05.42.32;	author kbyanc;	state Exp;
branches;
next	1.3.2.2;

1.3.2.2
date	2001.04.25.10.58.12;	author ru;	state Exp;
branches;
next	1.3.2.3;

1.3.2.3
date	2002.01.22.09.46.32;	author joerg;	state Exp;
branches;
next	1.3.2.4;

1.3.2.4
date	2002.04.19.13.22.46;	author ru;	state Exp;
branches;
next	1.3.2.5;

1.3.2.5
date	2002.04.19.13.46.38;	author ru;	state Exp;
branches;
next	1.3.2.6;

1.3.2.6
date	2012.11.17.07.24.27;	author svnexp;	state Exp;
branches;
next	;

1.1.2.1
date	99.06.18.00.42.58;	author ken;	state Exp;
branches;
next	;


desc
@@


1.23
log
@Switching exporter and resync
@
text
@# $FreeBSD: head/sbin/camcontrol/Makefile 237281 2012-06-20 00:17:29Z scottl $

PROG=	camcontrol
SRCS=	camcontrol.c util.c
.if !defined(RELEASE_CRUNCH)
SRCS+=	fwdownload.c modeedit.c progress.c
.else
CFLAGS+= -DMINIMALISTIC
.endif
# This is verboten
.if ${MACHINE_CPUARCH} == "arm"
WARNS?= 3
.endif
DPADD=	${LIBCAM} ${LIBSBUF} ${LIBUTIL}
LDADD=	-lcam -lsbuf -lutil
MAN=	camcontrol.8

.include <bsd.prog.mk>
@


1.23.2.1
log
@file Makefile was added on branch RELENG_8_4 on 2013-03-28 13:03:31 +0000
@
text
@d1 18
@


1.23.2.2
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/248810
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@a0 19
# $FreeBSD: releng/8.4/sbin/camcontrol/Makefile 172093 2007-09-08 20:24:12Z ken $

PROG=	camcontrol
SRCS=	camcontrol.c util.c
.if !defined(RELEASE_CRUNCH)
SRCS+=	modeedit.c
.else
CFLAGS+= -DMINIMALISTIC
.endif
.if ${MACHINE_ARCH} == "arm"
WARNS?= 3
.else
WARNS?=	6
.endif
DPADD=	${LIBCAM} ${LIBSBUF} ${LIBUTIL}
LDADD=	-lcam -lsbuf -lutil
MAN=	camcontrol.8

.include <bsd.prog.mk>
@


1.22
log
@SVN rev 237281 on 2012-06-20 00:17:29Z by scottl

Update the 'fwdownload' command to also flash disks connected over an
ATA/SATA transport.  The detection logic is automatic, so it should Just
Work.  While here, also improve the progress meter that is displayed
during firmware download.

Submitted by:	Alistair Crooks
Obtained from:	Netflix, Inc.
MFC after:	3 days
@
text
@d1 1
a1 1
# $FreeBSD$
@


1.21
log
@SVN rev 230727 on 2012-01-29 09:12:34Z by nyan

Fix build when RELEASE_CRUNCH is defined.
@
text
@d6 1
a6 1
SRCS+=	fwdownload.c modeedit.c
@


1.20
log
@SVN rev 227961 on 2011-11-25 04:03:37Z by emaste

Add firmware update support for SCSI devices.

Firmware can be reprogrammed on devices from Hitachi, HP, IBM, Plextor,
Quantum, and Seagate.  At least one device from each manufacturer has
been tested with some version of this code, and it has been used to
update thousands of drives so far.

The man page suggests having a backup of the drive's data, and the
operation must be confirmed, either interactively or on the command
line.  (This is the same as the confirmation on the format command.)

This work is largely derived from fwprog.c by Andre Albsmeier.

Submitted by:	Nima Misaghian
Sponsored by:	Sandvine Incorporated
MFC after:	3 months
@
text
@d4 1
a4 1
SRCS=	camcontrol.c fwdownload.c util.c
d6 1
a6 1
SRCS+=	modeedit.c
@


1.19
log
@SVN rev 211725 on 2010-08-23 22:24:11Z by imp

MFtbemd:

Prefer MACHNE_CPUARCH to MACHINE_ARCH in most contexts where you want
to test of all the CPUs of a given family conform.
@
text
@d4 1
a4 1
SRCS=	camcontrol.c util.c
@


1.19.2.1
log
@SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.19.2.2
log
@SVN rev 237740 on 2012-06-29 03:37:23Z by scottl

Merge the firmware download functionality into camcontrol, as well as
several other minor code changes.

Obtained from:	Netflix, Inc.
@
text
@d6 1
a6 1
SRCS+=	fwdownload.c modeedit.c progress.c
@


1.19.2.3
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242902
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242902 | dteske | 2012-11-11 23:29:45 +0000 (Sun, 11 Nov 2012) | 10 lines
## SVN ##
## SVN ## Fix a regression introduced by SVN r211417 that saw the breakage of a feature
## SVN ## documented in usr.sbin/sysinstall/help/shortcuts.hlp (reproduced below):
## SVN ##
## SVN ## If /usr/sbin/sysinstall is linked to another filename, say
## SVN ## `/usr/local/bin/configPackages', then the basename will be used
## SVN ## as an implicit command name.
## SVN ##
## SVN ## Reviewed by:	adrian (co-mentor)
## SVN ## Approved by:	adrian (co-mentor)
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d1 1
a1 1
# $FreeBSD: stable/9/sbin/camcontrol/Makefile 237740 2012-06-29 03:37:23Z scottl $
@


1.19.2.2.2.1
log
@SVN rev 239080 on 2012-08-05 23:54:33Z by kensmith

Copy stable/9 to releng/9.1 as part of the 9.1-RELEASE release process.

Approved by:	re (implicit)
@
text
@@


1.19.2.2.2.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/9.1/sbin/camcontrol/Makefile 237740 2012-06-29 03:37:23Z scottl $
@


1.19.2.1.2.1
log
@SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith

Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
cycle.

Approved by:	re (implicit)
@
text
@@


1.19.2.1.2.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/9.0/sbin/camcontrol/Makefile 211725 2010-08-23 22:24:11Z imp $
@


1.18
log
@SVN rev 198236 on 2009-10-19 16:00:24Z by ru

Switch the default WARNS level for sbin/ to 6.

Submitted by:	Ulrich Spörlein
@
text
@d10 2
a11 1
.if ${MACHINE_ARCH} == "arm"
@


1.17
log
@Add SCSI READ CAPACITY support to camcontrol.  The new 'readcap' subcommand
will automatically issue the 16 byte verison of read capacity if the device
in question is larger than 2TB.

There are also a number of output options here (last block, number of
blocks, human readable) that should meet most needs, and also aid in
scripting.

Approved by:	re (bmah)
MFC after:	1 week
@
text
@a11 2
.else
WARNS?=	6
@


1.17.2.1
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: stable/7/sbin/camcontrol/Makefile 172093 2007-09-08 20:24:12Z ken $
@


1.17.14.1
log
@SVN rev 216618 on 2010-12-21 17:10:29Z by kensmith

Copy stable/7 to releng/7.4 in preparation for FreeBSD-7.4 release.

Approved by:	re (implicit)
@
text
@@


1.17.14.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/7.4/sbin/camcontrol/Makefile 172093 2007-09-08 20:24:12Z ken $
@


1.17.12.1
log
@SVN rev 203736 on 2010-02-10 00:26:20Z by kensmith

Copy stable/7 to releng/7.3 as part of the 7.3-RELEASE process.

Approved by:	re (implicit)
@
text
@@


1.17.10.1
log
@SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith

Copy head to stable/8 as part of 8.0 Release cycle.

Approved by:	re (Implicit)
@
text
@@


1.17.10.2
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242909
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242909 | dim | 2012-11-12 07:47:19 +0000 (Mon, 12 Nov 2012) | 20 lines
## SVN ##
## SVN ## MFC r242625:
## SVN ##
## SVN ## Remove duplicate const specifiers in many drivers (I hope I got all of
## SVN ## them, please let me know if not).  Most of these are of the form:
## SVN ##
## SVN ## static const struct bzzt_type {
## SVN ##       [...list of members...]
## SVN ## } const bzzt_devs[] = {
## SVN ##       [...list of initializers...]
## SVN ## };
## SVN ##
## SVN ## The second const is unnecessary, as arrays cannot be modified anyway,
## SVN ## and if the elements are const, the whole thing is const automatically
## SVN ## (e.g. it is placed in .rodata).
## SVN ##
## SVN ## I have verified this does not change the binary output of a full kernel
## SVN ## build (except for build timestamps embedded in the object files).
## SVN ##
## SVN ## Reviewed by:	yongari, marius
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d1 1
a1 1
# $FreeBSD: stable/8/sbin/camcontrol/Makefile 172093 2007-09-08 20:24:12Z ken $
@


1.17.10.1.8.1
log
@SVN rev 232438 on 2012-03-03 06:15:13Z by kensmith

Copy stable/8 to releng/8.3 as part of 8.3-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.17.10.1.8.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/8.3/sbin/camcontrol/Makefile 172093 2007-09-08 20:24:12Z ken $
@


1.17.10.1.6.1
log
@SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith

Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release.

Approved by:	re (implicit)
@
text
@@


1.17.10.1.4.1
log
@SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith

Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.

Approved by:	re (implicit)
@
text
@@


1.17.10.1.2.1
log
@SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith

Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure.

Approved by:	re (implicit)
@
text
@@


1.17.8.1
log
@SVN rev 191087 on 2009-04-15 03:14:26Z by kensmith

Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.

Approved by:	re (implicit)
@
text
@@


1.17.6.1
log
@SVN rev 185281 on 2008-11-25 02:59:29Z by kensmith

Create releng/7.1 in preparation for moving into RC phase of 7.1 release
cycle.

Approved by:	re (implicit)
@
text
@@


1.16
log
@Use WARNS?=3 for these in the arm case for now, due to toolchain issues.
@
text
@d15 2
a16 2
DPADD=	${LIBCAM} ${LIBSBUF}
LDADD=	-lcam -lsbuf
@


1.16.8.1
log
@MFC:
camcontrol/Makefile:	rev 1.17
camcontrol.8:		rev 1.44
camcontrol.c:		rev 1.58

Add SCSI READ CAPACITY support to camcontrol.  The new 'readcap' subcommand
will automatically issue the 16 byte verison of read capacity if the device
in question is larger than 2TB.

There are also a number of output options here (last block, number of
blocks, human readable) that should meet most needs, and also aid in
scripting.
@
text
@d15 2
a16 2
DPADD=	${LIBCAM} ${LIBSBUF} ${LIBUTIL}
LDADD=	-lcam -lsbuf -lutil
@


1.16.8.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: stable/6/sbin/camcontrol/Makefile 172214 2007-09-18 01:26:28Z ken $
@


1.16.8.1.4.1
log
@SVN rev 183531 on 2008-10-02 02:57:24Z by kensmith

Create releng/6.4 from stable/6 in preparation for 6.4-RC1.

Approved by:	re (implicit)
@
text
@@


1.15
log
@Make this WARNS=6 clean by:
 1: add 'const' to char * where needed;
 2: mark unused variables with __unused;
 3: remove double prototypes for mode_edit and mode_list.
 4: moves the global variables 'bus', 'target', and 'lun' into
        the main function and protect them with #ifndef MINIMALISTIC,
 5: renames 3 variable in order not to shadow other things
        index -> indx -- in modepage_dump since index is a function
		from <strings.h.>
        arglist -> arglst -- in the function parse_btl since arglist
                is also a global variable
        convertend -> convertend2 -- in the function editentry_set
                since that name is used two times within the function.
 6: cast 0xffffffff in the macro RESOLUTION_MAX(size) to (int)
        since it is unsigned otherwise.

Tested by:	make universe
Approved by:	ken
@
text
@d10 3
d14 1
@


1.14
log
@Remove MAINTAINER= lines in the makefiles for camcontrol, iostat, libcam
and libdevstat, since the new way of doing things is to just list
maintainership in src/MAINTAINERS.

Also, remove duplicate entries in src/MAINTAINERS for those utilities.  I
already had entries for them.
@
text
@d10 1
a10 1
WARNS=	1
@


1.13
log
@Set WARNS=1.  RESOLUTION_MAX macro has major signed/unsigned issues.
@
text
@a2 2
MAINTAINER= ken@@FreeBSD.org

@


1.12
log
@Make camcontrol WARNS=2 clean.

Approved by:	ken
@
text
@d12 1
@


1.11
log
@Style.

Approved by:	ken
@
text
@a11 1
WARNS=	0
@


1.10
log
@Well, RELEASE_BUILD_FIXIT has now been renamed into RELEASE_CRUNCH.
At least, the old version is still good for the MFC though (where
everything is still going the old way). ;-)
@
text
@a1 1
MAINTAINER=ken@@FreeBSD.ORG
d3 4
a6 2
PROG=   camcontrol
SRCS=   camcontrol.c util.c
d9 1
a9 6
.endif
MAN=   camcontrol.8
SDIR=	${.CURDIR}/../../sys

CFLAGS+= -I${SDIR}
.if defined(RELEASE_CRUNCH)
d13 3
a15 2
DPADD=   ${LIBCAM} ${LIBSBUF}
LDADD+=  -lcam -lsbuf
@


1.9
log
@Provide an option to make camcontrol `minimalistic': if the (env/make)
variable RELEASE_BUILD_FIXIT is defined, a camcontrol binary will be
built that only knows the "rescan" and "reset" subcommands.  The
resulting code is small enough to still fit onto the boot floppy.

Reviewed by:	ken
MFC after:	1 week
@
text
@d6 1
a6 1
.if !defined(RELEASE_BUILD_FIXIT)
d13 1
a13 1
.if defined(RELEASE_BUILD_FIXIT)
@


1.8
log
@Default to WARNS=2.
Binary builds that cannot handle this must explicitly set WARNS=0.

Reviewed by:	mike
@
text
@d5 4
a8 1
SRCS=   camcontrol.c modeedit.c util.c
d13 3
@


1.7
log
@Rewrite of the CAM error recovery code.

Some of the major changes include:

	- The SCSI error handling portion of cam_periph_error() has
	  been broken out into a number of subfunctions to better
	  modularize the code that handles the hierarchy of SCSI errors.
	  As a result, the code is now much easier to read.

	- String handling and error printing has been significantly
	  revamped.  We now use sbufs to do string formatting instead
	  of using printfs (for the kernel) and snprintf/strncat (for
	  userland) as before.

	  There is a new catchall error printing routine,
	  cam_error_print() and its string-based counterpart,
	  cam_error_string() that allow the kernel and userland
	  applications to pass in a CCB and have errors printed out
	  properly, whether or not they're SCSI errors.  Among other
	  things, this helped eliminate a fair amount of duplicate code
	  in camcontrol.

	  We now print out more information than before, including
	  the CAM status and SCSI status and the error recovery action
	  taken to remedy the problem.

	- sbufs are now available in userland, via libsbuf.  This
	  change was necessary since most of the error printing code
	  is shared between libcam and the kernel.

	- A new transfer settings interface is included in this checkin.
	  This code is #ifdef'ed out, and is primarily intended to aid
	  discussion with HBA driver authors on the final form the
	  interface should take.  There is example code in the ahc(4)
	  driver that implements the HBA driver side of the new
	  interface.  The new transfer settings code won't be enabled
	  until we're ready to switch all HBA drivers over to the new
	  interface.

src/Makefile.inc1,
lib/Makefile:		Add libsbuf.  It must be built before libcam,
			since libcam uses sbuf routines.

libcam/Makefile:	libcam now depends on libsbuf.

libsbuf/Makefile:	Add a makefile for libsbuf.  This pulls in the
			sbuf sources from sys/kern.

bsd.libnames.mk:	Add LIBSBUF.

camcontrol/Makefile:	Add -lsbuf.  Since camcontrol is statically
			linked, we can't depend on the dynamic linker
			to pull in libsbuf.

camcontrol.c:		Use cam_error_print() instead of checking for
			CAM_SCSI_STATUS_ERROR on every failed CCB.

sbuf.9:			Change the prototypes for sbuf_cat() and
			sbuf_cpy() so that the source string is now a
			const char *.  This is more in line wth the
			standard system string functions, and helps
			eliminate warnings when dealing with a const
			source buffer.

			Fix a typo.

cam.c:			Add description strings for the various CAM
			error status values, as well as routines to
			look up those strings.

			Add new cam_error_string() and
			cam_error_print() routines for userland and
			the kernel.

cam.h:			Add a new CAM flag, CAM_RETRY_SELTO.

			Add enumerated types for the various options
			available with cam_error_print() and
			cam_error_string().

cam_ccb.h:		Add new transfer negotiation structures/types.

			Change inq_len in the ccb_getdev structure to
			be "reserved".  This field has never been
			filled in, and will be removed when we next
			bump the CAM version.

cam_debug.h:		Fix typo.

cam_periph.c:		Modularize cam_periph_error().  The SCSI error
			handling part of cam_periph_error() is now
			in camperiphscsistatuserror() and
			camperiphscsisenseerror().

			In cam_periph_lock(), increase the reference
			count on the periph while we wait for our lock
			attempt to succeed so that the periph won't go
			away while we're sleeping.

cam_xpt.c:		Add new transfer negotiation code.  (ifdefed
			out)

			Add a new function, xpt_path_string().  This
			is a string/sbuf analog to xpt_print_path().

scsi_all.c:		Revamp string handing and error printing code.
			We now use sbufs for much of the string
			formatting code.  More of that code is shared
			between userland the kernel.

scsi_all.h:		Get rid of SS_TURSTART, it wasn't terribly
			useful in the first place.

			Add a new error action, SS_REQSENSE.  (Send a
			request sense and then retry the command.)
			This is useful when the controller hasn't
			performed autosense for some reason.

			Change the default actions around a bit.

scsi_cd.c,
scsi_da.c,
scsi_pt.c,
scsi_ses.c:		SF_RETRY_SELTO -> CAM_RETRY_SELTO.  Selection
			timeouts shouldn't be covered by a sense flag.

scsi_pass.[ch]:		SF_RETRY_SELTO -> CAM_RETRY_SELTO.

			Get rid of the last vestiges of a read/write
			interface.

libkern/bsearch.c,
sys/libkern.h,
conf/files:		Add bsearch.c, which is needed for some of the
			new table lookup routines.

aic7xxx_freebsd.c:	Define AHC_NEW_TRAN_SETTINGS if
			CAM_NEW_TRAN_CODE is defined.

sbuf.h,
subr_sbuf.c:		Add the appropriate #ifdefs so sbufs can
			compile and run in userland.

			Change sbuf_printf() to use vsnprintf()
			instead of kvprintf(), which is only available
			in the kernel.

			Change the source string for sbuf_cpy() and
			sbuf_cat() to be a const char *.

			Add __BEGIN_DECLS and __END_DECLS around
			function prototypes since they're now exported
			to userland.

kdump/mkioctls:		Include stdio.h before cam.h since cam.h now
			includes a function with a FILE * argument.

Submitted by:	gibbs (mostly)
Reviewed by:	jdp, marcel (libsbuf makefile changes)
Reviewed by:	des (sbuf changes)
Reviewed by:	ken
@
text
@d1 1
a1 1
# $FreeBSD: src/sbin/camcontrol/Makefile,v 1.6 2001/03/26 14:32:57 ru Exp $
d10 1
@


1.6
log
@- Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.
@
text
@d1 1
a1 1
# $FreeBSD: src/sbin/camcontrol/Makefile,v 1.5 2001/03/20 18:12:58 ru Exp $
d10 2
a11 2
DPADD=   ${LIBCAM}
LDADD+=  -lcam
@


1.5
log
@Set the default manual section for sbin/ to 8.
@
text
@d1 1
a1 1
# $FreeBSD: src/sbin/camcontrol/Makefile,v 1.4 2000/08/08 06:24:14 kbyanc Exp $
d6 1
@


1.4
log
@This is an overhaul of the mode page handling in camcontrol as well as
related patches. These include:
	* Mode page editting can be scripted. This involves two
	  things: first, if stdin is not a tty, changes are read from
	  stdin rather than invoking $EDITOR. Second, and more
	  importantly, not all modepage entries must be included in the
	  change set. This means that camcontrol can now gracefully handle
	  more intrusive editting from the $EDITOR, including removal or
	  rearrangement of lines. It also means that you can do stuff
	  like:
		# echo "WCE: 1" | camcontrol modepage da3 -m 8 -e
		# newfs /dev/da3
		# echo "WCE: 0" | camcontrol modepage da3 -m 8 -e
	* Range-checking on user-supplied input values. modeedit.c now
	  uses the field width specifiers to determine the maximum
	  allowable value for a field. If the user enters a value larger
	  than the maximum, it clips the value to the max and warns the
	  user. This also involved patching cam_cmdparse.c to be more
	  consistent with regards to the "count" parameter to arg_put
	  (previously is was the length of strings and 1 for all integral
	  types). The cam_cdbparse(3) man page was also updated to reflect
	  the revised semantics.
	* In the process, I removed the 64 entry limit on mode pages (not
	  that we were even close to hitting that limit). This was a nice
	  side-effect of the other changes.
	* Technically, the new mode editting functionality allows editting
	  of character array entries in mode pages (type 'c' or 'z'),
	  however since buff_encode doesn't grok them it is currently
	  useless.
	* Camcontrol gained two new options related to mode pages: -l and
	  -b. The former lists all available mode pages for a given
	  device. The latter forces mode page display in binary format
	  (the default when no mode page definition was found in
	  scsi_modes).
	* Added support for mode page names to scsi_modes. Allows names to
	  be displayed alongside mode numbers in the mode page
	  listing. Updated scsi_modes to use the new functionality. This
	  also adds the semicolon into the scsi_modes syntax as an
	  optional mode page definition terminator. This is needed to name
	  pages without providing a page format definition.
	* Updated scsi_all.h to include a structure describing mode page
	  headers.
	* Added $FreeBSD$ line to scsi_modes.

Inspired by:	dwhite
Reviewed by:	ken
@
text
@d1 1
a1 1
# $FreeBSD: src/sbin/camcontrol/Makefile,v 1.3 2000/01/21 23:18:08 mjacob Exp $
a5 1
MAN8=   camcontrol.8
@


1.3
log
@Specify the system directory for which we put in our include path
as a separate line so we can override it on the command line if
we need to.

Reviewed by:	ken@@freebsd.org
@
text
@d1 1
a1 1
# $FreeBSD: $
d5 1
a5 1
SRCS=   camcontrol.c modeedit.c
@


1.3.2.1
log
@MFC: Enhanced mode page editing functionality.
@
text
@d1 1
a1 1
# $FreeBSD: src/sbin/camcontrol/Makefile,v 1.4 2000/08/08 06:24:14 kbyanc Exp $
d5 1
a5 1
SRCS=   camcontrol.c modeedit.c util.c
@


1.3.2.2
log
@MFC: MAN[1-9] -> MAN.
@
text
@d1 1
a1 1
# $FreeBSD: src/sbin/camcontrol/Makefile,v 1.3.2.1 2000/08/14 05:42:32 kbyanc Exp $
d6 1
a6 1
MAN=   camcontrol.8
@


1.3.2.3
log
@MFC: merge the `minimalistic' changes as well as the re{scan,start} all
implementation.

Approved by:	re
@
text
@d1 1
a1 1
# $FreeBSD$
d5 1
a5 4
SRCS=   camcontrol.c util.c
.if !defined(RELEASE_BUILD_FIXIT)
SRCS+=	modeedit.c
.endif
a9 3
.if defined(RELEASE_BUILD_FIXIT)
CFLAGS+= -DMINIMALISTIC
.endif
@


1.3.2.4
log
@MFC: Drop support for -DRELEASE_BUILD_FIXIT and -DCRUNCHED_BINARY
in ${CFLAGS}.  The only supported method thus is -DRELEASE_CRUNCH.

Sponsored by:	FreeBSD 4.4 CD set from FreeBSD Mall, Inc.
@
text
@d6 1
a6 1
.if !defined(RELEASE_CRUNCH)
d13 1
a13 1
.if defined(RELEASE_CRUNCH)
@


1.3.2.5
log
@MFC: style.
@
text
@d2 1
d4 2
a5 4
MAINTAINER= ken@@FreeBSD.org

PROG=	camcontrol
SRCS=	camcontrol.c util.c
d8 6
a13 1
.else
d16 2
a17 3
DPADD=	${LIBCAM}
LDADD=	-lcam
MAN=	camcontrol.8
@


1.3.2.6
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: stable/4/sbin/camcontrol/Makefile 95052 2002-04-19 13:46:38Z ru $
@


1.2
log
@Add a MAINTAINER line to modules that I maintain.

Suggested by:	brian, markm
@
text
@d1 1
d7 1
d9 1
a9 1
CFLAGS+= -I${.CURDIR}/../../sys
@


1.1
log
@Camcontrol - A utility for configuring/manipulating the CAM subsystem

Submitted by:	"Kenneth D. Merry" <ken@@plutotech.com>
@
text
@d1 2
@


1.1.2.1
log
@MFC:  Add a MAINTAINER line to modules that I maintain.

Suggested by:	brian, markm
@
text
@a0 2
MAINTAINER=ken@@FreeBSD.ORG

@


