summaryrefslogtreecommitdiffstats
path: root/sbin/atacontrol
diff options
context:
space:
mode:
authorrodrigc <rodrigc@FreeBSD.org>2011-10-09 21:42:02 +0000
committerrodrigc <rodrigc@FreeBSD.org>2011-10-09 21:42:02 +0000
commitc78f4c8ed16ca19e4db3ef5375fdbd4c180cfbdf (patch)
tree16473b900b3a85275f2aa26cac205be19c9e2d2c /sbin/atacontrol
parent0616806cd05505bb43dc4c0bc664c801fdb9e539 (diff)
downloadFreeBSD-src-c78f4c8ed16ca19e4db3ef5375fdbd4c180cfbdf.zip
FreeBSD-src-c78f4c8ed16ca19e4db3ef5375fdbd4c180cfbdf.tar.gz
Add a "kern.features.ata_cam" sysctl in the kernel when the ATA_CAM kernel
option is defined. This sysctl can be queried by feature_present(3). Query for this feature in /sbin/atacontrol and /usr/sbin/burncd. If these utilities detect that ATA_CAM is enabled, then these utilities will error out. These utilities are compatible with the old ATA driver, but are incomptible with the new ATA_CAM driver. By erroring out, we give end-users an idea as to what remedies to use, and reduce the need for them to file PR's. For atacontrol, camcontrol must be used instead, and for burncd, alternative utilties from the ports collection must be used such as sysutils/cdrtools. In future, maybe someone can re-write burncd to work with ATA_CAM, but at least for now, we give a somewhat useful error message to end users. PR: 160979 Reviewed by: jh, Arnaud Lacombe <lacombar at gmail dot com> Reported by: Joe Barbish <fbsd8 at a1poweruser dot com> MFC after: 3 days
Diffstat (limited to 'sbin/atacontrol')
-rw-r--r--sbin/atacontrol/atacontrol.828
-rw-r--r--sbin/atacontrol/atacontrol.c5
2 files changed, 32 insertions, 1 deletions
diff --git a/sbin/atacontrol/atacontrol.8 b/sbin/atacontrol/atacontrol.8
index 6c44687..8f4a4fc 100644
--- a/sbin/atacontrol/atacontrol.8
+++ b/sbin/atacontrol/atacontrol.8
@@ -25,12 +25,19 @@
.\"
.\" $FreeBSD$
.\"
-.Dd February 21, 2009
+.Dd October 9, 2011
.Dt ATACONTROL 8
.Os
.Sh NAME
.Nm atacontrol
.Nd ATA device driver control program
+.Pp
+This utility was
+.Em deprecated
+in
+.Fx 9.0 .
+See
+.Sx NOTES .
.Sh SYNOPSIS
.Nm
.Aq Ar command
@@ -361,11 +368,17 @@ or syslog logging on it as the disk will be worn out spinning down and
up all the time.
.Sh SEE ALSO
.Xr ata 4
+.Xr cam 4
+.Xr camcontrol 8
.Sh HISTORY
The
.Nm
utility first appeared in
.Fx 4.6 .
+.Pp
+.Nm
+was deprecated in
+.Fx 9.0 .
.Sh AUTHORS
.An -nosplit
The
@@ -377,3 +390,16 @@ utility was written by
This manual page was written by
.An S\(/oren Schmidt
.Aq sos@FreeBSD.org .
+.Sh NOTES
+The
+.Nm
+utility was deprecated in
+.Fx 9.0 .
+When
+.Bd -ragged -offset indent
+.Cd "options ATA_CAM"
+.Ed
+.Pp
+is compiled into the kernel, then
+.Xr camcontrol 8
+must be used instead.
diff --git a/sbin/atacontrol/atacontrol.c b/sbin/atacontrol/atacontrol.c
index 7b67821..4b9b74f 100644
--- a/sbin/atacontrol/atacontrol.c
+++ b/sbin/atacontrol/atacontrol.c
@@ -378,6 +378,11 @@ main(int argc, char **argv)
{
int fd, mode, channel, array;
+ if (feature_present("ata_cam")) {
+ errx(1, "\nATA_CAM option is enabled in kernel.\n"
+ "Please use camcontrol instead.");
+ }
+
if (argc < 2)
usage();
OpenPOWER on IntegriCloud