HEADS UP - DEVFS ON MASTER
Simon 'corecode' Schubert
corecode at fs.ei.tum.de
Wed Aug 5 03:47:54 PDT 2009
YONETANI Tomokazu wrote:
diff --git a/sys/platform/vkernel/platform/init.c b/sys/platform/vkernel/platform/init.c
index 2d3fd72..7caaf5b 100644
--- a/sys/platform/vkernel/platform/init.c
+++ b/sys/platform/vkernel/platform/init.c
@@ -955,9 +955,7 @@ netif_open_tap(const char *netif, int *tap_unit, int s)
*/
failed = 1;
if (fstat(tap_fd, &st) == 0 && S_ISCHR(st.st_mode) &&
- TAPDEV_MAJOR(st.st_rdev) == TAP_CDEV_MAJOR) {
- *tap_unit = TAPDEV_MINOR(st.st_rdev);
-
+ sscanf(tap_dev, "/dev/tap%d", tap_unit) == 1) {
/*
* Bring up the corresponding tap(4) interface
*/
That seems strange. Shouldn't be tap be cloning, i.e. just open
/dev/tap, and then use devname(fd) (to retrieve the ifname) or ioctl()
(to set the ifname)?
cheers
simon
--
<3 the future +++ RENT this banner advert +++ ASCII Ribbon /"\
rock the past +++ space for low CHF NOW!1 +++ Campaign \ /
Party Enjoy Relax | http://dragonflybsd.org Against HTML \
Dude 2c 2 the max ! http://golden-apple.biz Mail + News / \
More information about the Kernel
mailing list