Skip to content

Commit

Permalink
Disable the unconditional opening of /dev/tap0.
Browse files Browse the repository at this point in the history
This was more of an experiment, but it results in the tap
interface being created if it didn't exist which isn't a
desirable side effect.

This is easy to re-enable if it turns out people are
using networking in grub-bhyve.

(issue from https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=200710)
  • Loading branch information
grehan-freebsd committed Jul 20, 2015
1 parent 4d5afc1 commit dcb9889
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions grub-core/net/drivers/emu/emunet.c
Expand Up @@ -114,9 +114,15 @@ GRUB_MOD_INIT(emunet)
}
#endif
#ifdef __FreeBSD__
fd = open ("/dev/tap0", O_RDWR | O_NONBLOCK);
if (fd < 0)
return;
/*
* To experiment with this on FreeBSD on a tap device, use the
* following code fragment:
* fd = open ("/dev/tap0", O_RDWR | O_NONBLOCK);
* if (fd < 0)
* return;
*/
fd = -1;
return;
#endif
grub_net_card_register (&emucard);
}
Expand Down

0 comments on commit dcb9889

Please sign in to comment.