netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* /sys/class/misc has entry net/tun
@ 2004-02-13 17:37 Tommi Virtanen
  0 siblings, 0 replies; only message in thread
From: Tommi Virtanen @ 2004-02-13 17:37 UTC (permalink / raw)
  To: netdev

[0 tv@tao /sys/class/misc]$ uname -a
Linux tao 2.6.2-rc2 #6 Mon Jan 26 10:54:50 EET 2004 i686 GNU/Linux
[0 tv@tao /sys/class/misc]$ echo *
intermezzo net/tun psaux rtc uinput
[0 tv@tao /sys/class/misc]$

Seems like that's all because of this:

static struct miscdevice tun_miscdev = {
         .minor = TUN_MINOR,
         .name = "net/tun",
         .fops = &tun_fops
};

Name is apparently meant to be a filename, not a path.
Don't know what should be done to it; maybe

static struct miscdevice tun_miscdev = {
         .minor = TUN_MINOR,
         .name = "tun",
         .fops = &tun_fops,
         .devfs_name = "misc/net/tun",
};

But I havent tried that out.

I'd suggest this, to flush out all the problems. Later,
it can be changed to return -EINVAL or BUG_ON.

--- 1.26/drivers/char/misc.c    Thu Jan 15 13:05:56 2004
+++ edited/misc.c       Fri Feb 13 19:35:45 2004
@@ -212,6 +212,9 @@
  int misc_register(struct miscdevice * misc)
  {
         struct miscdevice *c;
+
+       if (misc->name && strchr(misc->name, '/'))
+         printk("%s: name contains slash when registering %s.\n", 
__func__, misc->name);

         down(&misc_sem);
         list_for_each_entry(c, &misc_list, list) {

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

only message in thread, other threads:[~2004-02-13 17:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-13 17:37 /sys/class/misc has entry net/tun Tommi Virtanen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).