Re: Is there a way I can check from a kernel module if a device file exists ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Le Mon, 11 Feb 2008 09:37:48 +0200,
"Ian Brown" <ianbrn@xxxxxxxxx> a écrit :

> Is there a way I can check from a kernel module if a device file
> exists ?

No.

> For example, I want to check if a device file named :
> "/dev/myDeviceFile" exist (this device file should represent a char
> device).

You probably don't want to do that, it's considered bad design. Can you
tell us more about what you're trying to do, so that we could probably
give you an idea on what to try ?

For information, the device file in /dev must either be created
manually, or are created automatically by udev [1]. Instead of trying
to mess up with device files in the kernel, you should probably
configure udev instead.

Sincerly,

Thomas

[1] http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html
-- 
Thomas Petazzoni, Free Electrons
Free Embedded Linux Training Materials
on http://free-electrons.com/training
(More than 1500 pages!)

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux