From 9f7f4f99d434166d775b7c37ddf6edd581ae3ab8 Mon Sep 17 00:00:00 2001 From: des Date: Mon, 18 Dec 2000 14:35:54 +0000 Subject: [PATCH] If no device is specified, check the CDROM environment variable before picking the default device. --- usr.sbin/cdcontrol/cdcontrol.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usr.sbin/cdcontrol/cdcontrol.c b/usr.sbin/cdcontrol/cdcontrol.c index 0161bdd2a90..7af88374e04 100644 --- a/usr.sbin/cdcontrol/cdcontrol.c +++ b/usr.sbin/cdcontrol/cdcontrol.c @@ -197,6 +197,10 @@ int main (int argc, char **argv) if (argc > 0 && ! strcasecmp (*argv, "help")) usage (); + if (! cdname) { + cdname = getenv("CDROM"); + } + if (! cdname) { cdname = DEFAULT_CD_DRIVE; warnx("no CD device name specified, defaulting to %s", cdname); -- 2.45.2