mount-setup: don't complain if we try to fix the label of a dir beneath a mount but can't due to EROFS

This commit is contained in:
Lennart Poettering
2012-07-03 16:25:50 +02:00
parent 61b1477c81
commit c9bc076461
6 changed files with 13 additions and 10 deletions
+2 -2
View File
@@ -91,7 +91,7 @@ static int node_symlink(struct udev *udev, const char *node, const char *slink)
buf[len] = '\0';
if (strcmp(target, buf) == 0) {
log_debug("preserve already existing symlink '%s' to '%s'\n", slink, target);
label_fix(slink, true);
label_fix(slink, true, false);
utimensat(AT_FDCWD, slink, NULL, AT_SYMLINK_NOFOLLOW);
goto exit;
}
@@ -307,7 +307,7 @@ static int node_fixup(struct udev_device *dev, mode_t mode, uid_t uid, gid_t gid
* something else has set a custom context in the meantime.
*/
if (strcmp(udev_device_get_action(dev), "add") == 0)
label_fix(devnode, true);
label_fix(devnode, true, false);
/* always update timestamp when we re-use the node, like on media change events */
utimensat(AT_FDCWD, devnode, NULL, 0);