diff options
author | des <des@FreeBSD.org> | 2000-12-18 14:35:54 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2000-12-18 14:35:54 +0000 |
commit | 9f7f4f99d434166d775b7c37ddf6edd581ae3ab8 (patch) | |
tree | 249a36a7c8a67e34e23a515a34d9f76ba3413bee /usr.sbin/cdcontrol | |
parent | 2615d1c9400adb0769090707c69b9983cde2bf9b (diff) | |
download | FreeBSD-src-9f7f4f99d434166d775b7c37ddf6edd581ae3ab8.zip FreeBSD-src-9f7f4f99d434166d775b7c37ddf6edd581ae3ab8.tar.gz |
If no device is specified, check the CDROM environment variable before
picking the default device.
Diffstat (limited to 'usr.sbin/cdcontrol')
-rw-r--r-- | usr.sbin/cdcontrol/cdcontrol.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/usr.sbin/cdcontrol/cdcontrol.c b/usr.sbin/cdcontrol/cdcontrol.c index 0161bdd..7af8837 100644 --- a/usr.sbin/cdcontrol/cdcontrol.c +++ b/usr.sbin/cdcontrol/cdcontrol.c @@ -198,6 +198,10 @@ int main (int argc, char **argv) usage (); if (! cdname) { + cdname = getenv("CDROM"); + } + + if (! cdname) { cdname = DEFAULT_CD_DRIVE; warnx("no CD device name specified, defaulting to %s", cdname); } |