diff options
author | jkh <jkh@FreeBSD.org> | 1997-01-15 16:21:10 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1997-01-15 16:21:10 +0000 |
commit | 0a608020ca8ac7086e4c8bda6632c6de3371557d (patch) | |
tree | 5cd14f8429c545bf05b57d3db39aae1b37ae9270 /usr.sbin/sade/devices.c | |
parent | 685ecfc4277d59baa4edf2ef39c962e3bdcab039 (diff) | |
download | FreeBSD-src-0a608020ca8ac7086e4c8bda6632c6de3371557d.zip FreeBSD-src-0a608020ca8ac7086e4c8bda6632c6de3371557d.tar.gz |
Keep our serial ports distinct so that first device is not found for
all (closes PR#2296).
Print better FTP failure diagnostics
Do better media failure checking in install.
Diffstat (limited to 'usr.sbin/sade/devices.c')
-rw-r--r-- | usr.sbin/sade/devices.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/usr.sbin/sade/devices.c b/usr.sbin/sade/devices.c index 5dcca80..9580cdb 100644 --- a/usr.sbin/sade/devices.c +++ b/usr.sbin/sade/devices.c @@ -358,6 +358,23 @@ deviceFind(char *name, DeviceType class) return j ? found : NULL; } +Device ** +deviceFindDescr(char *name, char *desc, DeviceType class) +{ + static Device *found[DEV_MAX]; + int i, j; + + j = 0; + for (i = 0; i < numDevs; i++) { + if ((!name || !strcmp(Devices[i]->name, name)) && + (!desc || !strcmp(Devices[i]->description, desc)) && + (class == DEVICE_TYPE_ANY || class == Devices[i]->type)) + found[j++] = Devices[i]; + } + found[j] = NULL; + return j ? found : NULL; +} + int deviceCount(Device **devs) { |