summaryrefslogtreecommitdiffstats
path: root/usr.sbin/burncd/burncd.c
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 /usr.sbin/burncd/burncd.c
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 'usr.sbin/burncd/burncd.c')
-rw-r--r--usr.sbin/burncd/burncd.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/usr.sbin/burncd/burncd.c b/usr.sbin/burncd/burncd.c
index 43a0a09..ab31997 100644
--- a/usr.sbin/burncd/burncd.c
+++ b/usr.sbin/burncd/burncd.c
@@ -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";
OpenPOWER on IntegriCloud