udev: drop redundant log message and fix returned error code
This commit is contained in:
parent
8912a99cea
commit
b7759e0403
|
@ -24,7 +24,7 @@ static int inotify_fd = -1;
|
|||
int udev_watch_init(void) {
|
||||
inotify_fd = inotify_init1(IN_CLOEXEC);
|
||||
if (inotify_fd < 0)
|
||||
return log_error_errno(errno, "Failed to create inotify descriptor: %m");
|
||||
return -errno;
|
||||
|
||||
return inotify_fd;
|
||||
}
|
||||
|
|
|
@ -1578,9 +1578,10 @@ static int manager_new(Manager **ret, int fd_ctrl, int fd_uevent, const char *cg
|
|||
if (r < 0)
|
||||
return log_error_errno(r, "could not enable SO_PASSCRED: %m");
|
||||
|
||||
manager->fd_inotify = udev_watch_init();
|
||||
if (manager->fd_inotify < 0)
|
||||
return log_error_errno(ENOMEM, "error initializing inotify");
|
||||
r = udev_watch_init();
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to create inotify descriptor: %m");
|
||||
manager->fd_inotify = r;
|
||||
|
||||
udev_watch_restore();
|
||||
|
||||
|
|
Loading…
Reference in New Issue