Add support for using the CDROM env var for device to use;

PR: 38178
This commit is contained in:
sos 2003-05-04 10:09:57 +00:00
parent b0531d3fc7
commit 34cf7a7cc5
2 changed files with 14 additions and 1 deletions

View File

@ -181,6 +181,16 @@ available in the
.Fx
Ports Collection, is commonly used to create ISO9660 file system images
from a given directory tree.
.Sh ENVIRONMENT
The following environment variables affect the execution of
.Nm :
.Pp
.Bl -tag -width CD_DRIVE -compact
.It Ev CDROM
The cd device to use if one isn't specified with the
.Fl f
flag.
.Sh BUGS
Probably, please report when found.
.Sh HISTORY

View File

@ -76,7 +76,10 @@ main(int argc, char **argv)
int dao = 0, eject = 0, fixate = 0, list = 0, multi = 0, preemp = 0;
int nogap = 0, speed = 4 * 177, test_write = 0, force = 0;
int block_size = 0, block_type = 0, cdopen = 0, dvdrw = 0;
const char *dev = "/dev/acd0c";
const char *dev;
if ((dev = getenv("CDROM")) == NULL)
dev = "/dev/acd0";
while ((ch = getopt(argc, argv, "def:Flmnpqs:tv")) != -1) {
switch (ch) {