kern/114057: devfs symlink over device doesn't work

Remko Lodder remko at FreeBSD.org
Tue Jun 26 23:00:15 UTC 2007


The following reply was made to PR kern/114057; it has been noted by GNATS.

From: Remko Lodder <remko at FreeBSD.org>
To: Stef Walter <stef at memberwebs.com>
Cc: freebsd-gnats-submit at FreeBSD.org
Subject: Re: kern/114057: devfs symlink over device doesn't work
Date: Wed, 27 Jun 2007 00:51:46 +0200

 Stef Walter wrote:
 > 
 >> How-To-Repeat:
 >   # cd /dev
 >   # rm console
 >   # touch /var/log/console
 >   # ln -s /var/log/console console
 >   # ls -l console
 >   ls: console: No such file or directory
 > 
 >> Fix:
 > 
 > 
 > Patch attached with submission follows:
 > 
 > --- sys/fs/devfs/devfs_vnops.c.orig	Mon Oct 30 15:46:29 2006
 > +++ sys/fs/devfs/devfs_vnops.c	Tue Jun 26 16:16:24 2007
 > @@ -1263,7 +1263,7 @@
 >  #ifdef MAC
 >  	mac_create_devfs_symlink(ap->a_cnp->cn_cred, dmp->dm_mount, dd, de);
 >  #endif
 > -	TAILQ_INSERT_TAIL(&dd->de_dlist, de, de_list);
 > +	TAILQ_INSERT_HEAD(&dd->de_dlist, de, de_list);
 >  	return (devfs_allocv(de, ap->a_dvp->v_mount, ap->a_vpp, td));
 >  }
 >  
 > 
 
 (i am unfamiliar with devfs): Isn't this somethign that devfs
 maintains? If you remove something under /dev then devfs doesn't
 take that into account yet, and any new thing arriving there
 which isn't under control of devfs gets ignored? In my opinion
 now that we have devfs, that should manage everything in /dev
 and if you want to do something fancy with that, it falls outside
 of regular configurations and thus might or might not work.
 
 That said I will repeat that i am unfamiliar with devfs so the
 idea behind it might be totally different from what I think is
 the focus for devfs.
 
 Regards,
 remko
 
 -- 
 Kind regards,
 
      Remko Lodder               ** remko at elvandar.org
      FreeBSD                    ** remko at FreeBSD.org
 
      /* Quis custodiet ipsos custodes */


More information about the freebsd-bugs mailing list