Re: HEADS UP - DEVFS ON MASTER

看板DFBSD_kernel作者時間16年前 (2009/08/05 20:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串4/8 (看更多)
Short update: It turns out that ls is doing something ugly: it is retrieving the major and minor from the udev, which isn't constructed anymore from major and minor. What I will be doing is change ls to work properly and commit it later this afternoon together with another bunch of changes/fixes. Cheers, Alex 2009/8/5 Alex <ahornung@gmail.com>: > Hi, > > about if_tap, it should in theory autoclone on opening /dev/tap and > using fdevname or fdevname_r to retrieve the name from the open > descriptor. It is untested, but the code is present and should work at > least as far as creating the clone device. > > As for major/minor goes, major is set to 0 always and minor was the > way it used to be. Relevant line in devfs_vnops.c: > vap->va_rminor =3D DEVFS_NODE(ap->a_vp)->d_dev->si_uminor; (in getattr) > > Sincerely, > Alex > > 2009/8/5 Simon 'corecode' Schubert <corecode@fs.ei.tum.de>: >> 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, in= t >>> s) >>> =A0 =A0 =A0 =A0 */ >>> =A0 =A0 =A0 =A0failed =3D 1; >>> =A0 =A0 =A0 =A0if (fstat(tap_fd, &st) =3D=3D 0 && S_ISCHR(st.st_mode) &= & >>> - =A0 =A0 =A0 =A0 =A0 TAPDEV_MAJOR(st.st_rdev) =3D=3D TAP_CDEV_MAJOR) { >>> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 *tap_unit =3D TAPDEV_MINOR(st.st_rdev); >>> - >>> + =A0 =A0 =A0 =A0 =A0 sscanf(tap_dev, "/dev/tap%d", tap_unit) =3D=3D 1)= { >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 * Bring up the corresponding tap(4) int= erface >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 */ >> >> That seems strange. =A0Shouldn'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 >> =A0simon >> >> -- >> =A0<3 the future =A0+++ =A0RENT this banner advert =A0+++ =A0 ASCII Ribb= on =A0 /"\ >> =A0rock the past =A0+++ =A0space for low CHF NOW!1 =A0+++ =A0 =A0 Campai= gn =A0 =A0 \ / >> Party Enjoy Relax =A0 | =A0 http://dragonflybsd.org =A0 =A0 =A0Against = =A0HTML =A0 \ >> Dude 2c 2 the max =A0 ! =A0 http://golden-apple.biz =A0 =A0 =A0 Mail + N= ews =A0 / \ >> >
文章代碼(AID): #1AUNl9mB (DFBSD_kernel)
討論串 (同標題文章)
文章代碼(AID): #1AUNl9mB (DFBSD_kernel)