All of lore.kernel.org
 help / color / mirror / Atom feed
* return value of inotify_add_watch()
@ 2009-08-30  2:36 Marco d'Itri
  2009-08-30 18:44 ` Kay Sievers
  0 siblings, 1 reply; 2+ messages in thread
From: Marco d'Itri @ 2009-08-30  2:36 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 511 bytes --]

inotify_add_watch may fail in udev_watch_begin, and then a link with
name -1 is created.
I do not know why, but it happened once on my system:

lrwxrwxrwx 1 root root 27 Aug  4 11:27 -1 -> /devices/virtual/block/ram8

Then udev would log an error every time it was restarted:

Aug 30 04:17:20 bongo udevd[12451]: unable to move watches dir '/dev/.udev/watch', old watches will not be restored: Directory not empty

Maybe the content of the .old directory should also be deleted.

-- 
ciao,
Marco

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: return value of inotify_add_watch()
  2009-08-30  2:36 return value of inotify_add_watch() Marco d'Itri
@ 2009-08-30 18:44 ` Kay Sievers
  0 siblings, 0 replies; 2+ messages in thread
From: Kay Sievers @ 2009-08-30 18:44 UTC (permalink / raw)
  To: linux-hotplug

On Sun, Aug 30, 2009 at 04:36, Marco d'Itri<md@linux.it> wrote:
> inotify_add_watch may fail in udev_watch_begin, and then a link with
> name -1 is created.
> I do not know why, but it happened once on my system:
>
> lrwxrwxrwx 1 root root 27 Aug  4 11:27 -1 -> /devices/virtual/block/ram8
>
> Then udev would log an error every time it was restarted:
>
> Aug 30 04:17:20 bongo udevd[12451]: unable to move watches dir '/dev/.udev/watch', old watches will not be restored: Directory not empty

I changed it to give up, and not to create the link when the add fails.

Thanks,
Kay

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-08-30 18:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-30  2:36 return value of inotify_add_watch() Marco d'Itri
2009-08-30 18:44 ` Kay Sievers

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.