DragonFly kernel List (threaded) for 2009-08
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: HEADS UP - DEVFS ON MASTER
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 / \
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]