From: Daan De Meyer Date: Fri, 25 Nov 2022 14:09:53 +0000 (+0100) Subject: repart: Remove bogus check X-Git-Tag: v253-rc1~441 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5fe8dbe728e5a4aeda0c6ce7748592614565dbe9;p=thirdparty%2Fsystemd.git repart: Remove bogus check The --empty option applies to the partition table of the block device, not the number of definition files we've read. Also, even if we don't find any definition files, let's not shortcut execution so we can run repart on a device/loopback file to get information on the partition table. --- diff --git a/src/partition/repart.c b/src/partition/repart.c index 7e56cc51551..6951a1bf00e 100644 --- a/src/partition/repart.c +++ b/src/partition/repart.c @@ -6323,11 +6323,6 @@ static int run(int argc, char *argv[]) { if (r < 0) return r; - if (context->n_partitions <= 0 && arg_empty == EMPTY_REFUSE) { - log_info("Didn't find any partition definition files, nothing to do."); - return 0; - } - r = find_root(&node, &backing_fd); if (r < 0) return r;