* mkdir of /etc/.udev/rules.d/
@ 2009-11-03 15:21 Marco d'Itri
2009-11-04 10:58 ` Kay Sievers
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Marco d'Itri @ 2009-11-03 15:21 UTC (permalink / raw)
To: linux-hotplug
udev_rules_new() in udev/udev-rules.c unconditionally creates the
directory.
This is a problem because the function is called also by e.g. udevadm
test, and creating /dev/.udev/ when it does not exist is an unacceptable
side effect which will break everything else that checks for its
existence to know if udev is running.
Why is this needed?
--
ciao,
Marco
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: mkdir of /etc/.udev/rules.d/
2009-11-03 15:21 mkdir of /etc/.udev/rules.d/ Marco d'Itri
@ 2009-11-04 10:58 ` Kay Sievers
2009-11-04 14:28 ` Marco d'Itri
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Kay Sievers @ 2009-11-04 10:58 UTC (permalink / raw)
To: linux-hotplug
On Tue, Nov 3, 2009 at 16:21, Marco d'Itri <md@linux.it> wrote:
> udev_rules_new() in udev/udev-rules.c unconditionally creates the
> directory.
> This is a problem because the function is called also by e.g. udevadm
> test, and creating /dev/.udev/ when it does not exist is an unacceptable
> side effect which will break everything else that checks for its
> existence to know if udev is running.
> Why is this needed?
No specific reason, I remember. It could move into the daemon, before
the inotify watch.
Thanks,
Kay
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: mkdir of /etc/.udev/rules.d/
2009-11-03 15:21 mkdir of /etc/.udev/rules.d/ Marco d'Itri
2009-11-04 10:58 ` Kay Sievers
@ 2009-11-04 14:28 ` Marco d'Itri
2009-11-04 14:44 ` Kay Sievers
2009-11-04 16:09 ` Kay Sievers
3 siblings, 0 replies; 5+ messages in thread
From: Marco d'Itri @ 2009-11-04 14:28 UTC (permalink / raw)
To: linux-hotplug
On Nov 04, Kay Sievers <kay.sievers@vrfy.org> wrote:
> > udev_rules_new() in udev/udev-rules.c unconditionally creates the
> > directory.
> > This is a problem because the function is called also by e.g. udevadm
> > test, and creating /dev/.udev/ when it does not exist is an unacceptable
> > side effect which will break everything else that checks for its
> > existence to know if udev is running.
> > Why is this needed?
> No specific reason, I remember. It could move into the daemon, before
> the inotify watch.
Why create it at all?
(I suspect that this was done to suppress a warning about the missing
directory, but then I'd rather do it properly with a flag...)
--
ciao,
Marco
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: mkdir of /etc/.udev/rules.d/
2009-11-03 15:21 mkdir of /etc/.udev/rules.d/ Marco d'Itri
2009-11-04 10:58 ` Kay Sievers
2009-11-04 14:28 ` Marco d'Itri
@ 2009-11-04 14:44 ` Kay Sievers
2009-11-04 16:09 ` Kay Sievers
3 siblings, 0 replies; 5+ messages in thread
From: Kay Sievers @ 2009-11-04 14:44 UTC (permalink / raw)
To: linux-hotplug
On Wed, Nov 4, 2009 at 15:28, Marco d'Itri <md@linux.it> wrote:
> On Nov 04, Kay Sievers <kay.sievers@vrfy.org> wrote:
>
>> > udev_rules_new() in udev/udev-rules.c unconditionally creates the
>> > directory.
>> > This is a problem because the function is called also by e.g. udevadm
>> > test, and creating /dev/.udev/ when it does not exist is an unacceptable
>> > side effect which will break everything else that checks for its
>> > existence to know if udev is running.
>> > Why is this needed?
>> No specific reason, I remember. It could move into the daemon, before
>> the inotify watch.
> Why create it at all?
> (I suspect that this was done to suppress a warning about the missing
> directory, but then I'd rather do it properly with a flag...)
It's to be able to subscribe to changes in that directory with
inotify. We want to create it before we try to watch it, but only the
daemon needs to do this.
Kay
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: mkdir of /etc/.udev/rules.d/
2009-11-03 15:21 mkdir of /etc/.udev/rules.d/ Marco d'Itri
` (2 preceding siblings ...)
2009-11-04 14:44 ` Kay Sievers
@ 2009-11-04 16:09 ` Kay Sievers
3 siblings, 0 replies; 5+ messages in thread
From: Kay Sievers @ 2009-11-04 16:09 UTC (permalink / raw)
To: linux-hotplug
On Wed, Nov 4, 2009 at 15:44, Kay Sievers <kay.sievers@vrfy.org> wrote:
> On Wed, Nov 4, 2009 at 15:28, Marco d'Itri <md@linux.it> wrote:
>> On Nov 04, Kay Sievers <kay.sievers@vrfy.org> wrote:
>>
>>> > udev_rules_new() in udev/udev-rules.c unconditionally creates the
>>> > directory.
>>> > This is a problem because the function is called also by e.g. udevadm
>>> > test, and creating /dev/.udev/ when it does not exist is an unacceptable
>>> > side effect which will break everything else that checks for its
>>> > existence to know if udev is running.
>>> > Why is this needed?
>>> No specific reason, I remember. It could move into the daemon, before
>>> the inotify watch.
>> Why create it at all?
>> (I suspect that this was done to suppress a warning about the missing
>> directory, but then I'd rather do it properly with a flag...)
>
> It's to be able to subscribe to changes in that directory with
> inotify. We want to create it before we try to watch it, but only the
> daemon needs to do this.
I have changed this now, and only the daemon creates the directory,
right before it establishes the inotify watch.
Kay
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-11-04 16:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-03 15:21 mkdir of /etc/.udev/rules.d/ Marco d'Itri
2009-11-04 10:58 ` Kay Sievers
2009-11-04 14:28 ` Marco d'Itri
2009-11-04 14:44 ` Kay Sievers
2009-11-04 16:09 ` Kay Sievers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).