1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-11 09:18:07 +03:00

repart: quit earlier if no .conf file exists

Fixes #14804.
This commit is contained in:
Yu Watanabe 2020-02-06 23:43:02 +09:00 committed by Zbigniew Jędrzejewski-Szmek
parent 2b6a90d17f
commit 0ae5ffe063

View File

@ -2938,10 +2938,6 @@ static int run(int argc, char *argv[]) {
if (r < 0)
return r;
r = find_root(&node);
if (r < 0)
return r;
context = context_new(arg_seed);
if (!context)
return log_oom();
@ -2950,6 +2946,13 @@ static int run(int argc, char *argv[]) {
if (r < 0)
return r;
if (context->n_partitions <= 0)
return 0;
r = find_root(&node);
if (r < 0)
return r;
r = context_load_partition_table(context, node);
if (r == -EHWPOISON)
return 77; /* Special return value which means "Not GPT, so not doing anything". This isn't