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.
This commit is contained in:
committed by
Luca Boccassi
parent
8bf1d14112
commit
021b0ff405
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user