Add fd = -1 after close when we detect the format so that subsequent

open_dev will reopen the device.
This commit is contained in:
Warner Losh 2009-01-02 08:21:21 +00:00
parent 42a168ce61
commit 96747dc015
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=186696

View file

@ -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)