Skip to content

Commit

Permalink
udevadm: ignore EROFS and return earlier
Browse files Browse the repository at this point in the history
Fixes systemd#14060.

(cherry picked from commit dc11d2b)
  • Loading branch information
yuwata authored and keszybz committed Nov 19, 2019
1 parent 1ec5b9f commit b9a619b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/udev/udevadm-trigger.c
Expand Up @@ -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;
Expand Down

0 comments on commit b9a619b

Please sign in to comment.