Date: Thu, 29 Sep 2011 15:20:04 -0700 From: Craig Rodrigues <rodrigc@crodrigues.org> To: Jaakko Heinonen <jh@freebsd.org> Cc: freebsd-current@freebsd.org Subject: Re: bin/160979: 9.0 burncd error caused by change to cd0 from acd0 Message-ID: <CAG=rPVcLUqs14VfxKffDBWCoBG7u=C5dV45n3ameRXzu5rqHvQ@mail.gmail.com> In-Reply-To: <20110928081514.GA5077@jh> References: <4E811FF7.7010607@a1poweruser.com> <4E8126D3.5020407@FreeBSD.org> <CAG=rPVeAPt0_=jNXaHcnB8QCtYuvi5z69MDMFEgyD0HBQT0Mcw@mail.gmail.com> <4E812DB7.3000302@FreeBSD.org> <CAG=rPVcTHiPLFG1%2BdZmi1OWpyZsw=Px=PJT55UFGN_mxt3y%2BJw@mail.gmail.com> <alpine.BSF.2.00.1109262027460.81576@toaster.local> <CAG=rPVeYjqZJuEzVG_kf%2B29bZx%2BZ%2B7du6DsoFou92WDx78B5Dg@mail.gmail.com> <alpine.BSF.2.00.1109262106390.81576@toaster.local> <CAJ-VmokTFaG09=3S8Fw1RwYDJ-Q2OXd0rox6e5AW1DBR4W1AjA@mail.gmail.com> <CAG=rPVdhqhjPEwHGhHBoOYB6rTX=UD2%2B-ehK8-6oT93M5Ec5Tg@mail.gmail.com> <20110928081514.GA5077@jh>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
On Wed, Sep 28, 2011 at 1:15 AM, Jaakko Heinonen <jh@freebsd.org> wrote:
>
> I think that using the FEATURE() macro and feature_present(3) might be
> more appropriate for this.
>
> Thanks.
> --
> Jaakko
>
Oh, OK. I was unfamiliar with these API's because they are new in FreeBSD 8. :)
How about the attached patch?
--
Craig Rodrigues
rodrigc@crodrigues.org
[-- Attachment #2 --]
Index: sys/dev/ata/ata-all.c
===================================================================
--- sys/dev/ata/ata-all.c (revision 225368)
+++ sys/dev/ata/ata-all.c (working copy)
@@ -120,6 +120,9 @@
TUNABLE_INT("hw.ata.setmax", &ata_setmax);
SYSCTL_INT(_hw_ata, OID_AUTO, setmax, CTLFLAG_RDTUN, &ata_setmax, 0,
"ATA disk set max native address");
+#ifdef ATA_CAM
+FEATURE(ata_cam, "ATA devices are accessed through the cam(4) driver");
+#endif
/*
* newbus device interface related functions
Index: usr.sbin/burncd/burncd.8
===================================================================
--- usr.sbin/burncd/burncd.8 (revision 225368)
+++ usr.sbin/burncd/burncd.8 (working copy)
@@ -33,6 +33,13 @@
.Sh NAME
.Nm burncd
.Nd control the ATAPI CD-R/RW driver
+.Pp
+This utility was
+.Em deprecated
+in
+.Fx 9.0 .
+See
+.Sx NOTES .
.Sh SYNOPSIS
.Nm
.Op Fl deFlmnpqtv
@@ -211,6 +218,10 @@
.Nm
utility appeared in
.Fx 4.0 .
+.Pp
+.Nm
+was deprecated in
+.Fx 9.0 .
.Sh AUTHORS
The
.Nm
@@ -220,3 +231,19 @@
.Aq sos@FreeBSD.org .
.Sh BUGS
Probably, please report when found.
+.Sh NOTES
+When
+.Bd -ragged -offset indent
+.Cd "options ATA_CAM"
+.Ed
+.Pp
+is compiled into the kernel, then
+.Xr cdrecord 1 ,
+available in the
+.Fx
+Ports Collection as part of the
+.Pa sysutils/cdrtools
+port, must be used instead.
+Refer to:
+.Pp
+http://www.freebsd.org/doc/handbook/creating-cds.html#CDRECORD
Index: usr.sbin/burncd/burncd.c
===================================================================
--- usr.sbin/burncd/burncd.c (revision 225368)
+++ usr.sbin/burncd/burncd.c (working copy)
@@ -82,6 +82,15 @@
int block_size = 0, block_type = 0, cdopen = 0, dvdrw = 0;
const char *dev, *env_speed;
+ if (feature_present("ata_cam")) {
+ printf("\nATA_CAM option is enabled in kernel.\n"
+ "Install the sysutils/cdrtools port and use cdrecord "
+ "instead.\n\n"
+ "Please refer to:\n"
+ "http://www.freebsd.org/doc/handbook/creating-cds.html#CDRECORD\n");
+ exit(1);
+ }
+
if ((dev = getenv("CDROM")) == NULL)
dev = "/dev/acd0";
Index: sbin/atacontrol/atacontrol.c
===================================================================
--- sbin/atacontrol/atacontrol.c (revision 225368)
+++ sbin/atacontrol/atacontrol.c (working copy)
@@ -378,6 +378,11 @@
{
int fd, mode, channel, array;
+ if (feature_present("ata_cam")) {
+ errx(1, "ATA_CAM option is enabled in kernel.\n"
+ "Please use camcontrol instead.\n");
+ }
+
if (argc < 2)
usage();
Index: sbin/atacontrol/atacontrol.8
===================================================================
--- sbin/atacontrol/atacontrol.8 (revision 225368)
+++ sbin/atacontrol/atacontrol.8 (working copy)
@@ -25,12 +25,19 @@
.\"
.\" $FreeBSD$
.\"
-.Dd February 21, 2009
+.Dd September 27, 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 @@
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 @@
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG=rPVcLUqs14VfxKffDBWCoBG7u=C5dV45n3ameRXzu5rqHvQ>
