udev: don't complain when udev_watch_end() is called without udev_watch_init()
E.g. udevadm test prints "Invalid inotify descriptor." which is meaningless without any context. I think it should be OK to call udev_watch_end() from a cleanup path without any warning (even at debug level).
This commit is contained in:
parent
6b9f5f01cb
commit
d6d4961b01
|
@ -125,8 +125,7 @@ int udev_watch_end(sd_device *dev) {
|
|||
int wd, r;
|
||||
|
||||
if (inotify_fd < 0)
|
||||
return log_debug_errno(SYNTHETIC_ERRNO(EINVAL),
|
||||
"Invalid inotify descriptor.");
|
||||
return 0; /* Nothing to do. */
|
||||
|
||||
r = device_get_watch_handle(dev, &wd);
|
||||
if (r == -ENOENT)
|
||||
|
|
Loading…
Reference in New Issue