]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udevadm: ignore EROFS and return earlier
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 18 Nov 2019 09:47:16 +0000 (18:47 +0900)
committerLennart Poettering <lennart@poettering.net>
Mon, 18 Nov 2019 15:07:21 +0000 (16:07 +0100)
Fixes #14060.

src/udev/udevadm-trigger.c

index 11f2f1c98515d1c813ef923f595b0e8108dbe483..60c68b5029cf986981902c287d50d9309be291d8 100644 (file)
@@ -45,10 +45,13 @@ static int exec_list(sd_device_enumerator *e, const char *action, Set *settle_se
 
                 r = write_string_file(filename, action, WRITE_STRING_FILE_DISABLE_BUFFER);
                 if (r < 0) {
-                        bool ignore = IN_SET(r, -ENOENT, -EACCES, -ENODEV);
+                        bool ignore = IN_SET(r, -ENOENT, -EACCES, -ENODEV, -EROFS);
 
                         log_full_errno(ignore ? LOG_DEBUG : LOG_ERR, r,
-                                       "Failed to write '%s' to '%s': %m", action, filename);
+                                       "Failed to write '%s' to '%s'%s: %m",
+                                       action, filename, ignore ? ", ignoring" : "");
+                        if (r == -EROFS)
+                                return 0; /* Read only filesystem. Return earlier. */
                         if (ret == 0 && !ignore)
                                 ret = r;
                         continue;