summaryrefslogtreecommitdiffstats
path: root/release
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1995-12-11 16:32:33 +0000
committerjkh <jkh@FreeBSD.org>1995-12-11 16:32:33 +0000
commitc4908135ec2f4b5cbe7350045a6a125222097c42 (patch)
tree1c0c12a51869dad04e62be3f5457ada5ebb21512 /release
parentc8faa6306816ff0579d5da9a21765cb2050a6b32 (diff)
downloadFreeBSD-src-c4908135ec2f4b5cbe7350045a6a125222097c42.zip
FreeBSD-src-c4908135ec2f4b5cbe7350045a6a125222097c42.tar.gz
Bring my changes forward from 2.1
Diffstat (limited to 'release')
-rw-r--r--release/sysinstall/devices.c13
-rw-r--r--release/sysinstall/disks.c6
-rw-r--r--release/sysinstall/label.c9
3 files changed, 12 insertions, 16 deletions
diff --git a/release/sysinstall/devices.c b/release/sysinstall/devices.c
index 7951422..ba933c82 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.36.2.11 1995/11/15 06:57:02 jkh Exp $
+ * $Id: devices.c,v 1.37 1995/12/07 10:33:38 peter Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -47,6 +47,7 @@
#include <sys/param.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
+#include <sys/errno.h>
#include <net/if.h>
#include <net/if_dl.h>
@@ -166,6 +167,8 @@ deviceTry(char *name, char *try)
fd = open(try, O_RDWR);
if (fd > 0)
return fd;
+ else if (errno == EACCES)
+ return 0;
snprintf(try, FILENAME_MAX, "/mnt/dev/%s", name);
fd = open(try, O_RDWR);
return fd;
@@ -251,7 +254,7 @@ deviceGetAll(void)
case DEVICE_TYPE_CDROM:
fd = deviceTry(device_names[i].name, try);
if (fd >= 0) {
- close(fd);
+ if (fd) close(fd);
(void)deviceRegister(device_names[i].name, device_names[i].description, strdup(try),
DEVICE_TYPE_CDROM, TRUE, mediaInitCDROM, mediaGetCDROM, NULL,
mediaShutdownCDROM, NULL);
@@ -262,7 +265,7 @@ deviceGetAll(void)
case DEVICE_TYPE_TAPE:
fd = deviceTry(device_names[i].name, try);
if (fd >= 0) {
- close(fd);
+ if (fd) close(fd);
deviceRegister(device_names[i].name, device_names[i].description, strdup(try),
DEVICE_TYPE_TAPE, TRUE, mediaInitTape, mediaGetTape, NULL, mediaShutdownTape, NULL);
msgDebug("Found a device of type TAPE named: %s\n", device_names[i].name);
@@ -272,7 +275,7 @@ deviceGetAll(void)
case DEVICE_TYPE_FLOPPY:
fd = deviceTry(device_names[i].name, try);
if (fd >= 0) {
- close(fd);
+ if (fd) close(fd);
deviceRegister(device_names[i].name, device_names[i].description, strdup(try),
DEVICE_TYPE_FLOPPY, TRUE, mediaInitFloppy, mediaGetFloppy, NULL,
mediaShutdownFloppy, NULL);
@@ -283,7 +286,7 @@ deviceGetAll(void)
case DEVICE_TYPE_NETWORK:
fd = deviceTry(device_names[i].name, try);
if (fd >= 0) {
- close(fd);
+ if (fd) close(fd);
/* The only network devices that have fds associated are serial ones */
deviceRegister(device_names[i].name, device_names[i].description, strdup(try), DEVICE_TYPE_NETWORK,
TRUE, mediaInitNetwork, NULL, NULL, mediaShutdownNetwork, NULL);
diff --git a/release/sysinstall/disks.c b/release/sysinstall/disks.c
index fb29202..0f9bf5b 100644
--- a/release/sysinstall/disks.c
+++ b/release/sysinstall/disks.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: disks.c,v 1.32 1995/09/18 16:52:23 peter Exp $
+ * $Id: disks.c,v 1.33 1995/12/07 10:33:39 peter Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -520,10 +520,6 @@ partitionHook(char *str)
msgConfirm("Unable to find disk %s!", str);
return 0;
}
- else if (devs[1]) {
- dialog_clear();
- msgConfirm("Bizarre multiple match for %s!", str);
- }
devs[0]->enabled = TRUE;
diskPartition(devs[0], (Disk *)devs[0]->private);
str = cp;
diff --git a/release/sysinstall/label.c b/release/sysinstall/label.c
index 21ef267..a7030a2 100644
--- a/release/sysinstall/label.c
+++ b/release/sysinstall/label.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: label.c,v 1.33 1995/09/18 16:52:28 peter Exp $
+ * $Id: label.c,v 1.34 1995/12/07 10:33:54 peter Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -108,10 +108,6 @@ labelHook(char *str)
msgConfirm("Unable to find disk %s!", str);
return 0;
}
- else if (devs[1]) {
- dialog_clear();
- msgConfirm("Bizarre multiple match for %s!", str);
- }
devs[0]->enabled = TRUE;
str = cp;
}
@@ -137,7 +133,8 @@ diskLabelEditor(char *str)
return RET_FAIL;
}
else if (cnt == 1 || variable_get(DISK_SELECTED)) {
- devs[0]->enabled = TRUE;
+ if (cnt == 1)
+ devs[0]->enabled = TRUE;
if (str && !strcmp(str, "script"))
i = scriptLabel(str);
else
OpenPOWER on IntegriCloud