projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2b6a90d
)
repart: quit earlier if no .conf file exists
author
Yu Watanabe
<watanabe.yu+github@gmail.com>
Thu, 6 Feb 2020 14:43:02 +0000
(23:43 +0900)
committer
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Thu, 6 Feb 2020 21:50:39 +0000
(22:50 +0100)
Fixes #14804.
src/partition/repart.c
patch
|
blob
|
history
diff --git
a/src/partition/repart.c
b/src/partition/repart.c
index 58fb9c7c5d33196043c79c91744e41a41b5cb780..71ac2bc01974a2c9348f67c31b318eb4fff05af8 100644
(file)
--- a/
src/partition/repart.c
+++ b/
src/partition/repart.c
@@
-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