From 27fce94ae6dca53da00595ffb6b1f443c09e7064 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Wed, 9 Jun 2021 23:48:50 +0900 Subject: [PATCH] nspawn: path_is_read_only_fs() may return negative errno And we usually assume /sys is not read only on error. --- src/nspawn/nspawn-network.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nspawn/nspawn-network.c b/src/nspawn/nspawn-network.c index 97e2756658b..023b1e7e1a8 100644 --- a/src/nspawn/nspawn-network.c +++ b/src/nspawn/nspawn-network.c @@ -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. */ -- 2.47.3