diff options
author | jkh <jkh@FreeBSD.org> | 1995-05-19 02:31:13 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1995-05-19 02:31:13 +0000 |
commit | 3474ee3930b2020ff8e8b697f5b838faac802549 (patch) | |
tree | 4ee465365dbc6023d0f458dc3c992f225c59fa0e /release/sysinstall/devices.c | |
parent | 95b8922f535f14021c768e54aa96aec6573baef7 (diff) | |
download | FreeBSD-src-3474ee3930b2020ff8e8b697f5b838faac802549.zip FreeBSD-src-3474ee3930b2020ff8e8b697f5b838faac802549.tar.gz |
Include serial ports as possible network candidates.
Diffstat (limited to 'release/sysinstall/devices.c')
-rw-r--r-- | release/sysinstall/devices.c | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/release/sysinstall/devices.c b/release/sysinstall/devices.c index b5c682a..41a74a3 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.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; |