summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sysinstall/devices.c
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1995-05-19 02:31:13 +0000
committerjkh <jkh@FreeBSD.org>1995-05-19 02:31:13 +0000
commit3474ee3930b2020ff8e8b697f5b838faac802549 (patch)
tree4ee465365dbc6023d0f458dc3c992f225c59fa0e /usr.sbin/sysinstall/devices.c
parent95b8922f535f14021c768e54aa96aec6573baef7 (diff)
downloadFreeBSD-src-3474ee3930b2020ff8e8b697f5b838faac802549.zip
FreeBSD-src-3474ee3930b2020ff8e8b697f5b838faac802549.tar.gz
Include serial ports as possible network candidates.
Diffstat (limited to 'usr.sbin/sysinstall/devices.c')
-rw-r--r--usr.sbin/sysinstall/devices.c29
1 files changed, 21 insertions, 8 deletions
diff --git a/usr.sbin/sysinstall/devices.c b/usr.sbin/sysinstall/devices.c
index b5c682a..41a74a3 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.17 1995/05/17 14:39:36 jkh Exp $
+ * $Id: devices.c,v 1.18 1995/05/18 13:18:34 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -105,9 +105,8 @@ static struct {
{ DEVICE_TYPE_NETWORK, "lnc", "Lance/PCnet cards (Isolan/Novell NE2100/NE32-VL)" },
{ DEVICE_TYPE_NETWORK, "ze", "IBM/National Semiconductor PCMCIA ethernet" },
{ DEVICE_TYPE_NETWORK, "zp", "3Com PCMCIA Etherlink III" },
- { DEVICE_TYPE_NETWORK, "cuaa0", "Serial port (COM1) - possible PPP device" },
- { DEVICE_TYPE_NETWORK, "cuaa1", "Serial port (COM2) - possible PPP devic
-e", },
+ { DEVICE_TYPE_NETWORK, "cuaa0", "Serial port (COM1) - possible PPP device" },
+ { DEVICE_TYPE_NETWORK, "cuaa1", "Serial port (COM2) - possible PPP device" },
{ NULL },
};
@@ -236,15 +235,29 @@ deviceGetAll(void)
}
break;
+ case DEVICE_TYPE_NETWORK:
+ fd = deviceTry(device_names[i].name);
+ if (fd > 0) {
+ close(fd);
+ CHECK_DEVS;
+ Devices[numDevs] = new_device(device_names[i].name);
+ Devices[numDevs]->type = DEVICE_TYPE_NETWORK;
+ Devices[numDevs]->enabled = FALSE;
+ Devices[numDevs]->init = mediaInitNetwork;
+ Devices[numDevs]->get = mediaGetNetwork;
+ Devices[numDevs]->close = mediaCloseNetwork;
+ Devices[numDevs]->private = NULL;
+ msgDebug("Found a device of type network named: %s\n", device_names[i].name);
+ ++numDevs;
+ }
+ break;
+
default:
break;
}
}
- /*
- * Now go for the network interfaces dynamically. Stolen shamelessly
- * from ifconfig!
- */
+ /* Now go for the (other) network interfaces dynamically. Stolen shamelessly from ifconfig! */
ifc.ifc_len = sizeof(buffer);
ifc.ifc_buf = buffer;
OpenPOWER on IntegriCloud