Skip to content

Commit 27fce94

Browse files
committed
nspawn: path_is_read_only_fs() may return negative errno
And we usually assume /sys is not read only on error.
1 parent 0ac655a commit 27fce94

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/nspawn/nspawn-network.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ int test_network_interface_initialized(const char *name) {
469469
_cleanup_(sd_device_unrefp) sd_device *d = NULL;
470470
int r;
471471

472-
if (path_is_read_only_fs("/sys"))
472+
if (path_is_read_only_fs("/sys") > 0)
473473
return 0;
474474

475475
/* udev should be around. */

0 commit comments

Comments
 (0)