]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
sfdisk: fix typo in --move-data when check partition size
authorKarel Zak <kzak@redhat.com>
Mon, 8 Nov 2021 13:01:55 +0000 (14:01 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 8 Nov 2021 13:01:55 +0000 (14:01 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
disk-utils/sfdisk.c

index b08c945c0687944aa4e179cf32a9be1662c1f1e4..65256c8a51d725f479a0e02646963a43917b9408 100644 (file)
@@ -418,7 +418,7 @@ static int move_partition_data(struct sfdisk *sf, size_t partno, struct fdisk_pa
                warnx(_("failed to get start of the old partition; ignoring --move-data"));
        else if (fdisk_partition_get_start(pa) == fdisk_partition_get_start(orig_pa))
                warnx(_("start of the partition has not been moved; ignoring --move-data"));
-       else if (fdisk_partition_get_size(orig_pa) < fdisk_partition_get_size(pa))
+       else if (fdisk_partition_get_size(orig_pa) > fdisk_partition_get_size(pa))
                warnx(_("new partition is smaller than original; ignoring --move-data"));
        else
                ok = 1;