diff options
| author | Jordan K. Hubbard <jkh@FreeBSD.org> | 1998-03-16 14:33:36 +0000 |
|---|---|---|
| committer | Jordan K. Hubbard <jkh@FreeBSD.org> | 1998-03-16 14:33:36 +0000 |
| commit | 03bcc3402ca245a4221cb959a927a7851950d056 (patch) | |
| tree | c31b60fc5f8abb92ba65952d4ffc07e5bb01a7a6 /release/sysinstall/devices.c | |
| parent | 6af7e6d6374b7759e88c28d9b93f48c0dee77a08 (diff) | |
Notes
Diffstat (limited to 'release/sysinstall/devices.c')
| -rw-r--r-- | release/sysinstall/devices.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/release/sysinstall/devices.c b/release/sysinstall/devices.c index 97a2d629525e..a4495d8c720b 100644 --- a/release/sysinstall/devices.c +++ b/release/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.49.2.15 1998/02/11 15:43:13 jkh Exp $ + * $Id: devices.c,v 1.49.2.16 1998/03/15 16:16:29 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -143,6 +143,9 @@ deviceTry(struct _devname dev, char *try, int i) snprintf(unit, sizeof unit, dev.name, i); snprintf(try, FILENAME_MAX, "/dev/%s", unit); + fd = open(try, O_RDONLY); + if (fd >= 0) + return fd; m = 0640; if (dev.dev_type == 'c') m |= S_IFCHR; @@ -296,7 +299,7 @@ skipif: case DEVICE_TYPE_DISK: fd = deviceTry(device_names[i], try, j); - if (fd >= 0) { + if (fd >= 0 && RunningAsInit) { dev_t d; int s, fail; char slice[80]; |
