diff options
author | jkh <jkh@FreeBSD.org> | 1995-05-29 11:01:42 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1995-05-29 11:01:42 +0000 |
commit | 4bc5a2dda3322237aff9d99c18e2080f78559ba4 (patch) | |
tree | f98b313f289088a0f9384387c68ec7516031cc7e /usr.sbin/sysinstall/devices.c | |
parent | 56df30b7c63bbeceb73f75bc2eb45c0e1c271e5e (diff) | |
download | FreeBSD-src-4bc5a2dda3322237aff9d99c18e2080f78559ba4.zip FreeBSD-src-4bc5a2dda3322237aff9d99c18e2080f78559ba4.tar.gz |
Sync up my work for the night. This should implement ALL possible
installation methods and provide a fairly robust set of menu options.
This should also fix a few more bugs on Poul-Henning's latest gripe
list.
Diffstat (limited to 'usr.sbin/sysinstall/devices.c')
-rw-r--r-- | usr.sbin/sysinstall/devices.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/usr.sbin/sysinstall/devices.c b/usr.sbin/sysinstall/devices.c index 77dd090..48c10e4 100644 --- a/usr.sbin/sysinstall/devices.c +++ b/usr.sbin/sysinstall/devices.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: devices.c,v 1.32 1995/05/27 23:52:55 jkh Exp $ + * $Id: devices.c,v 1.33 1995/05/28 09:31:31 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -183,15 +183,28 @@ deviceGetAll(void) int i; for (i = 0; names[i]; i++) { + Chunk *c1; Disk *d; d = Open_Disk(names[i]); if (!d) msgFatal("Unable to open disk %s", names[i]); - (void)deviceRegister(names[i], names[i], d->name, DEVICE_TYPE_DISK, FALSE, - mediaInitUFS, mediaGetUFS, NULL, deviceDiskFree, d); + (void)deviceRegister(names[i], names[i], d->name, DEVICE_TYPE_DISK, FALSE, NULL, NULL, NULL, NULL, d); msgDebug("Found a device of type disk named: %s\n", names[i]); + + /* Look for existing DOS partitions to register */ + for (c1 = d->chunks->part; c1; c1 = c1->next) { + if (c1->type == fat) { + Device *dev; + + /* Got one! */ + dev = deviceRegister(c1->name, c1->name, c1->name, DEVICE_TYPE_DOS, TRUE, + mediaInitDOS, mediaGetDOS, NULL, mediaShutdownDOS, NULL); + dev->private = c1; + msgDebug("Found a DOS partition %s on drive %s\n", c1->name, d->name); + } + } } free(names); } |