]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
nspawn: path_is_read_only_fs() may return negative errno
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 9 Jun 2021 14:48:50 +0000 (23:48 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 11 Jun 2021 18:19:08 +0000 (03:19 +0900)
And we usually assume /sys is not read only on error.

src/nspawn/nspawn-network.c

index 97e2756658bf3fc7f70627032841dc84ffc277a9..023b1e7e1a81b96c476e71f8f543f3ba5a19200b 100644 (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. */