diff options
author | Daan De Meyer <daan.j.demeyer@gmail.com> | 2023-09-22 13:47:14 +0200 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2023-09-22 17:01:12 +0200 |
commit | 021b0ff4050dd3bbb55ebc8f4a8a97cc5c03e258 (patch) | |
tree | debe460269826d8d6fe60791eaf4b5774af3a130 /src | |
parent | Merge pull request #29282 from YHNdnzj/hibernate-resume-meson (diff) | |
download | systemd-021b0ff4050dd3bbb55ebc8f4a8a97cc5c03e258.tar.xz systemd-021b0ff4050dd3bbb55ebc8f4a8a97cc5c03e258.zip |
repart: Don't fail on boot if we can't find the root block device
When booting from virtiofs, we won't be able to find a root block
device. Let's gracefully handle this similar to how we don't fail
if we can't find a GPT partition table.
Diffstat (limited to 'src')
-rw-r--r-- | src/partition/repart.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/partition/repart.c b/src/partition/repart.c index 6cadc5f668..2cc4881ada 100644 --- a/src/partition/repart.c +++ b/src/partition/repart.c @@ -7344,6 +7344,9 @@ static int run(int argc, char *argv[]) { return r; r = find_root(context); + if (r == -ENODEV) + return 76; /* Special return value which means "Root block device not found, so not doing + * anything". This isn't really an error when called at boot. */ if (r < 0) return r; |