udev: ignore ENOENT when chmod_and_chown() device node

This commit is contained in:
Yu Watanabe 2019-11-12 14:57:48 +09:00
parent 68f98816cb
commit 4b613ec212
1 changed files with 2 additions and 0 deletions

View File

@ -2333,6 +2333,8 @@ static int apply_static_dev_perms(const char *devnode, uid_t uid, gid_t gid, mod
gid = 0;
r = chmod_and_chown(device_node, mode, uid, gid);
if (r == -ENOENT)
return 0;
if (r < 0)
return log_error_errno(errno, "Failed to chown '%s' %u %u: %m",
device_node, uid, gid);