public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [muPATCH] TUN/TAP sysfs fix
@ 2004-03-13 20:49 rutger
  0 siblings, 0 replies; only message in thread
From: rutger @ 2004-03-13 20:49 UTC (permalink / raw)
  To: linux-kernel

Hi,

Using Gentoo2004.0 with udev (with /dev on ramfs) gives most devices
from sysfs. However, TUN/TAP is not listed. Digging into it further
revealed the error:

# ls /sys/class/misc
agpgart  hw_random  net/tun  psaux  rtc
 # ls -l /sys/class/misc
ls: /sys/class/misc/net/tun: No such file or directory
total 0
drwxr-xr-x    2 root     root            0 Mar 13 18:43 agpgart
...

A file with a '/' embedded.

Suggestion: change name from 'net/tun' to 'net_tun', to be as
unobtrusive as possible, which lets met use /dev/net_tun (using the
Unix ASCII to filename conversion convention ;)

The correct solution might be to change sysfs into auto-creating
directories for .names with embedded slashes, but that's outside the
scope of this quick make-it-work-again hack...

*** linux-2.6/drivers/net/tun.c~	Sat Mar 13 20:20:17 2004
--- linux-2.6/drivers/net/tun.c	Sat Mar 13 20:20:57 2004
***************
*** 602,608 ****
  
  static struct miscdevice tun_miscdev = {
  	.minor = TUN_MINOR,
! 	.name = "net/tun",
  	.fops = &tun_fops
  };
  
--- 602,608 ----
  
  static struct miscdevice tun_miscdev = {
  	.minor = TUN_MINOR,
! 	.name = "net_tun",
  	.fops = &tun_fops
  };
  

-- 
Rutger Nijlunsing ---------------------------- rutger ed tux tmfweb nl
never attribute to a conspiracy which can be explained by incompetence
----------------------------------------------------------------------

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-03-13 20:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-13 20:49 [muPATCH] TUN/TAP sysfs fix rutger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox