diff options
author | murray <murray@FreeBSD.org> | 2001-09-30 00:43:32 +0000 |
---|---|---|
committer | murray <murray@FreeBSD.org> | 2001-09-30 00:43:32 +0000 |
commit | c605847554205a074c69591402a21d9edb6d06a7 (patch) | |
tree | ebcce6d46c875a8300f2e91f5d25d91e05774639 /usr.sbin/sade/devices.c | |
parent | 20a6cccd28a63eba55eb299343b04b3ebce5e811 (diff) | |
download | FreeBSD-src-c605847554205a074c69591402a21d9edb6d06a7.zip FreeBSD-src-c605847554205a074c69591402a21d9edb6d06a7.tar.gz |
Close all open file descriptors before restarting sysinstall.
PR: bin/30737
Submitted by: Alexey V. Neyman <alex.neyman@auriga.ru>
Diffstat (limited to 'usr.sbin/sade/devices.c')
-rw-r--r-- | usr.sbin/sade/devices.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.sbin/sade/devices.c b/usr.sbin/sade/devices.c index 3099376..169d020 100644 --- a/usr.sbin/sade/devices.c +++ b/usr.sbin/sade/devices.c @@ -273,6 +273,7 @@ deviceGetAll(void) if (ioctl(s, SIOCGIFCONF, (char *) &ifc) < 0) goto skipif; /* Jump over network iface probing */ + close(s); ifflags = ifc.ifc_req->ifr_flags; end = (struct ifreq *) (ifc.ifc_buf + ifc.ifc_len); for (ifptr = ifc.ifc_req; ifptr < end; ifptr++) { @@ -319,6 +320,7 @@ deviceGetAll(void) loopend: if (ifptr->ifr_addr.sa_len) /* I'm not sure why this is here - it's inherited */ ifptr = (struct ifreq *)((caddr_t)ifptr + ifptr->ifr_addr.sa_len - sizeof(struct sockaddr)); + close(s); } skipif: |