2011-05-27 08:13:59

by Francis Moreau

[permalink] [raw]
Subject: Question about 'virtual' device setup

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