:: Re: [DNG] vdev - udev is a dead end
Inizio della pagina
Delete this message
Reply to this message
Autore: Didier Kryn
Data:  
To: dng
Oggetto: Re: [DNG] vdev - udev is a dead end
Le 14/08/2016 12:47, Didier Kryn a écrit :
> Le 10/08/2016 18:56, Didier Kryn a écrit :
>> Le 10/08/2016 18:20, Tomasz Torcz a écrit :
>>>   Current udev _cannot_  be used to
>>> populate /dev, it doesn't contain any mknod() calls enymore.
>>     Actually mknod isn't necessary since device files are created by 
>> the kernel in /sys/block/dev and /sys/char/dev and the hotplugger 
>> only needs to copy them to /dev.

>
>     Erratum. mknod is necessary because the files in 
> /sys/devices/char/dev and /sys/devices/block/dev appear as text files 
> containing the major and minor numbers separated by a colon.

>


    Erratum again. The devices are accessible through symlinks in 
/sys/dev/char and /sys/dev/block. The name of each symlink apparently 
duplicates the contents of the dev file in the directory it points to. Eg:


/sys/dev/char/4:0 --> /sys/devices/virtual/tty/tty0/
and /sys/devices/virtual/tty/tty0/dev contains "4:0", meaning the
device file should be created with
'mknod /dev/tty0 c 4 0'

     Didier