1. If device node already exists, don't gratuituously try to make it

again.

2. Don't create slice entries when running multi-user; it adds far too
   much to sysinstall's startup time.  User is expected to have correct
   slice entries after system is installed.
This commit is contained in:
Jordan K. Hubbard 1998-03-16 14:33:18 +00:00
parent 14e6f79297
commit 95742f4173
3 changed files with 15 additions and 6 deletions

View File

@ -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.70 1998/02/10 18:43:11 jkh Exp $
* $Id: devices.c,v 1.71 1998/03/15 16:15:47 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 @@ deviceGetAll(void)
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];

View File

@ -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.70 1998/02/10 18:43:11 jkh Exp $
* $Id: devices.c,v 1.71 1998/03/15 16:15:47 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 @@ deviceGetAll(void)
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];

View File

@ -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.70 1998/02/10 18:43:11 jkh Exp $
* $Id: devices.c,v 1.71 1998/03/15 16:15:47 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 @@ deviceGetAll(void)
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];