summaryrefslogtreecommitdiff
path: root/src/machine
diff options
context:
space:
mode:
Diffstat (limited to 'src/machine')
-rw-r--r--src/machine/image.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/machine/image.c b/src/machine/image.c
index 1574adf30b..8a119e5db7 100644
--- a/src/machine/image.c
+++ b/src/machine/image.c
@@ -112,7 +112,7 @@ static int image_make(
read_only =
(path && path_startswith(path, "/usr")) ||
- faccessat(dfd, filename, W_OK, AT_EACCESS) < 0;
+ (faccessat(dfd, filename, W_OK, AT_EACCESS) < 0 && errno == EROFS);
if (S_ISDIR(st.st_mode)) {