[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-hotplug
Subject:    Re: Does udev overwrite existing device nodes in /dev?
From:       Alan Jenkins <sourcejedi.lkml () googlemail ! com>
Date:       2009-10-15 9:01:42
Message-ID: 9b2b86520910150201j70aa52fcua7bdb9346b9565d4 () mail ! gmail ! com
[Download RAW message or body]

On 10/14/09, James Cheng <jcheng@tivo.com> wrote:
> Hi,
>
> I have an embedded system currently using a static /dev directory. I want to
> start using udev on it.  I know I can mount /dev as tmpfs, and then copy my
> static device nodes into it, and then run udev to create the rest of the
> dynamic nodes.
>
> What is the policy of udev if there is an device node in the /dev directory
> that has the same name as one that udev wants to create?

The policy is to overwrite it.  Udev owns /dev.

> Is there any
> logging that I can use to see name conflicts?

At the "info" level of logging, you will see either

1) preserve file '%s', because it has correct dev_t
2) atomically replace existing file '%s'

case 1) is not a conflict in the sense that you still get the same
device.  However udev can still set different permissions, which might
prevent applications from accessing the desired device.

> Is there a configuration
> option I can set to say "overwrite" or "don't overwrite"?

No.


You might try and experiment with udev interactively before adding it
to the boot process.  Check for changes using diff on the result of
"ls -l", etc.  I guess it depends how limited the system is though.

Regards
Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic