nspawn: path_is_read_only_fs() may return negative errno

And we usually assume /sys is not read only on error.
This commit is contained in:
Yu Watanabe 2021-06-09 23:48:50 +09:00
parent 0ac655a63b
commit 27fce94ae6

View file

@ -469,7 +469,7 @@ int test_network_interface_initialized(const char *name) {
_cleanup_(sd_device_unrefp) sd_device *d = NULL;
int r;
if (path_is_read_only_fs("/sys"))
if (path_is_read_only_fs("/sys") > 0)
return 0;
/* udev should be around. */