]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
repart: Remove bogus check
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 25 Nov 2022 14:09:53 +0000 (15:09 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 25 Nov 2022 23:27:41 +0000 (08:27 +0900)
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.

src/partition/repart.c

index 7e56cc5155131bdfd987b383fd5a3c7684f1e4cf..6951a1bf00ec6e1ebae28fa65fd8249f41e50c70 100644 (file)
@@ -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;