bin/160979: commit references a PR

dfilter service dfilter at FreeBSD.ORG
Sun Oct 9 21:50:14 UTC 2011


The following reply was made to PR bin/160979; it has been noted by GNATS.

From: dfilter at FreeBSD.ORG (dfilter service)
To: bug-followup at FreeBSD.org
Cc:  
Subject: Re: bin/160979: commit references a PR
Date: Sun,  9 Oct 2011 21:42:17 +0000 (UTC)

 Author: rodrigc
 Date: Sun Oct  9 21:42:02 2011
 New Revision: 226179
 URL: http://svn.freebsd.org/changeset/base/226179
 
 Log:
   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
 
 Modified:
   head/sbin/atacontrol/atacontrol.8
   head/sbin/atacontrol/atacontrol.c
   head/sys/dev/ata/ata-all.c
   head/usr.sbin/burncd/burncd.8
   head/usr.sbin/burncd/burncd.c
 
 Modified: head/sbin/atacontrol/atacontrol.8
 ==============================================================================
 --- head/sbin/atacontrol/atacontrol.8	Sun Oct  9 21:40:38 2011	(r226178)
 +++ head/sbin/atacontrol/atacontrol.8	Sun Oct  9 21:42:02 2011	(r226179)
 @@ -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
  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 at 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.
 
 Modified: head/sbin/atacontrol/atacontrol.c
 ==============================================================================
 --- head/sbin/atacontrol/atacontrol.c	Sun Oct  9 21:40:38 2011	(r226178)
 +++ head/sbin/atacontrol/atacontrol.c	Sun Oct  9 21:42:02 2011	(r226179)
 @@ -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();
  
 
 Modified: head/sys/dev/ata/ata-all.c
 ==============================================================================
 --- head/sys/dev/ata/ata-all.c	Sun Oct  9 21:40:38 2011	(r226178)
 +++ head/sys/dev/ata/ata-all.c	Sun Oct  9 21:42:02 2011	(r226179)
 @@ -120,6 +120,9 @@ SYSCTL_INT(_hw_ata, OID_AUTO, wc, CTLFLA
  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
 
 Modified: head/usr.sbin/burncd/burncd.8
 ==============================================================================
 --- head/usr.sbin/burncd/burncd.8	Sun Oct  9 21:40:38 2011	(r226178)
 +++ head/usr.sbin/burncd/burncd.8	Sun Oct  9 21:42:02 2011	(r226179)
 @@ -27,12 +27,19 @@
  .\"
  .\" $FreeBSD$
  .\"
 -.Dd December 21, 2009
 +.Dd October 9, 2011
  .Dt BURNCD 8
  .Os
  .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 @@ The
  .Nm
  utility appeared in
  .Fx 4.0 .
 +.Pp
 +.Nm
 +was deprecated in
 +.Fx 9.0 .
  .Sh AUTHORS
  The
  .Nm
 @@ -220,3 +231,19 @@ Denmark
  .Aq sos at 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
 
 Modified: head/usr.sbin/burncd/burncd.c
 ==============================================================================
 --- head/usr.sbin/burncd/burncd.c	Sun Oct  9 21:40:38 2011	(r226178)
 +++ head/usr.sbin/burncd/burncd.c	Sun Oct  9 21:42:02 2011	(r226179)
 @@ -82,6 +82,13 @@ main(int argc, char **argv)
  	int block_size = 0, block_type = 0, cdopen = 0, dvdrw = 0;
  	const char *dev, *env_speed;
  
 +	if (feature_present("ata_cam")) {
 +		errx(1, "\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");
 +	}
 +
  	if ((dev = getenv("CDROM")) == NULL)
  		dev = "/dev/acd0";
  
 _______________________________________________
 svn-src-all at freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe at freebsd.org"
 


More information about the freebsd-bugs mailing list