diff options
author | jkh <jkh@FreeBSD.org> | 1996-06-08 07:02:21 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1996-06-08 07:02:21 +0000 |
commit | 2a03e988da43e97ce7ad936d8d66606c4db8e434 (patch) | |
tree | 9d5e42a609d74826c3430900e01edf845acf1643 /usr.sbin/sade/main.c | |
parent | f26a3ce6a2a8fbc774d07ae08e9f77d87500f70f (diff) | |
download | FreeBSD-src-2a03e988da43e97ce7ad936d8d66606c4db8e434.zip FreeBSD-src-2a03e988da43e97ce7ad936d8d66606c4db8e434.tar.gz |
Make CDROMs automagically select as the default media type.
If you're running multi-user, check off items in the packages menu
based on whether or not they're actually installed.
Diffstat (limited to 'usr.sbin/sade/main.c')
-rw-r--r-- | usr.sbin/sade/main.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.sbin/sade/main.c b/usr.sbin/sade/main.c index 60d292c..c7cdffe 100644 --- a/usr.sbin/sade/main.c +++ b/usr.sbin/sade/main.c @@ -4,7 +4,7 @@ * This is probably the last attempt in the `sysinstall' line, the next * generation being slated for what's essentially a complete rewrite. * - * $Id: main.c,v 1.19 1996/05/16 11:47:33 jkh Exp $ + * $Id: main.c,v 1.20 1996/05/28 18:30:30 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -83,6 +83,12 @@ main(int argc, char **argv) /* Probe for all relevant devices on the system */ deviceGetAll(); + /* Try to set ourselves up as a CDROM if we can do that first */ + if (DITEM_STATUS(mediaSetCDROM(NULL)) == DITEM_SUCCESS) { + /* If we can't initialize it, it's probably not a FreeBSD CDROM so punt on it */ + if (!mediaDevice->init(mediaDevice)) + mediaDevice = NULL; + } if (argc > 1 && !RunningAsInit) { int i; |