From b383155ac6a94f14f5c661d2e4a62c1eef5b6e27 Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
Date: Mon, 8 Nov 2021 14:01:55 +0100
Subject: [PATCH] sfdisk: fix typo in --move-data when check partition size

Signed-off-by: Karel Zak <kzak@redhat.com>
---
 disk-utils/sfdisk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/disk-utils/sfdisk.c b/disk-utils/sfdisk.c
index b08c945..65256c8 100644
--- a/disk-utils/sfdisk.c
+++ b/disk-utils/sfdisk.c
@@ -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;
-- 
2.27.0

