summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Dodon2016-04-21 09:24:58 +0200
committerKarel Zak2016-05-05 11:43:07 +0200
commit14f644f386a1708483ed446e983c0976e3976a9d (patch)
tree7f54d27aaffc9b64a7cd57745860f524d5439208
parentbuild-sys: remove obsolete [cs]fdisk LDADDs (diff)
downloadkernel-qcow2-util-linux-14f644f386a1708483ed446e983c0976e3976a9d.tar.gz
kernel-qcow2-util-linux-14f644f386a1708483ed446e983c0976e3976a9d.tar.xz
kernel-qcow2-util-linux-14f644f386a1708483ed446e983c0976e3976a9d.zip
sfdisk: exit with error if rereading partition table fails
Use the return value of fdisk_reread_partition_table in write_changes so that sfdisk exits with error if re-reading the partition table fails. Signed-off-by: Victor Dodon <dodonvictor@gmail.com>
-rw-r--r--disk-utils/sfdisk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/disk-utils/sfdisk.c b/disk-utils/sfdisk.c
index 009803e6c..2f97bb48a 100644
--- a/disk-utils/sfdisk.c
+++ b/disk-utils/sfdisk.c
@@ -535,7 +535,7 @@ static int write_changes(struct sfdisk *sf)
rc = move_partition_data(sf, sf->partno, sf->orig_pa);
if (!rc) {
fdisk_info(sf->cxt, _("\nThe partition table has been altered."));
- fdisk_reread_partition_table(sf->cxt);
+ rc = fdisk_reread_partition_table(sf->cxt);
}
}
if (!rc)