svn commit: r186696 - head/usr.sbin/fwcontrol

Warner Losh imp at FreeBSD.org
Fri Jan 2 00:21:22 PST 2009


Author: imp
Date: Fri Jan  2 08:21:21 2009
New Revision: 186696
URL: http://svn.freebsd.org/changeset/base/186696

Log:
  Add fd = -1 after close when we detect the format so that subsequent
  open_dev will reopen the device.

Modified:
  head/usr.sbin/fwcontrol/fwcontrol.c

Modified: head/usr.sbin/fwcontrol/fwcontrol.c
==============================================================================
--- head/usr.sbin/fwcontrol/fwcontrol.c	Fri Jan  2 07:25:30 2009	(r186695)
+++ head/usr.sbin/fwcontrol/fwcontrol.c	Fri Jan  2 08:21:21 2009	(r186696)
@@ -1065,6 +1065,7 @@ main(int argc, char **argv)
 		if (recvfn == NULL) { /* guess... */
 			recvfn = detect_recv_fn(fd, TAG | CHANNEL);
 			close(fd);
+			fd = -1;
 		}
 		snprintf(devbase, sizeof(devbase), "%s%d.0", device_string, current_board);
 		if (open_dev(&fd, devbase) < 0)


More information about the svn-src-all mailing list