Question about 'virtual' device setup

From: Francis Moreau
Date: Fri May 27 2011 - 04:14:03 EST


Hello,

I'm wondering how a virtual device such as cpuid which can be found in
'arch/x86/kernel/cpuid.c' should be installed in my linux system.

Since cpuid doesn't have a real device, there's no event for udev to
create it a boot time.

I can see only 2 ways to currently setup the beast:

1/ force udev to create the node at boot time. Since the module has
no alias, the driver cannot be autoloaded when accessing the node so
the applicatoin has to modprobe the driver manually.

2/ let the application see if the node /dev/cpui/0/cpuid exists. If
not then modprobe cpuid and let udev creates the node

Is there any others ways to do this because it seems to me hackish to
let the application do the modprobe manually?

Thanks
--
Francis
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/