diff options
| author | Victor Dodon <dodonvictor@gmail.com> | 2016-04-21 00:24:58 -0700 |
|---|---|---|
| committer | Karel Zak <kzak@redhat.com> | 2016-06-14 11:24:25 +0200 |
| commit | e0d30ef4c0a8baf5ad52f4ebce2ceef1944d711b (patch) | |
| tree | 5d1cbd58761f82b328cc2dff81a5db2cc8660d73 | |
| parent | 5b7f8bbba13c6b2b26d14163569b35353ce9ceb9 (diff) | |
| download | util-linux-e0d30ef4c.tar.gz | |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/disk-utils/sfdisk.c b/disk-utils/sfdisk.c index 15fa99c47d..b520c9bc15 100644 --- a/disk-utils/sfdisk.c +++ b/disk-utils/sfdisk.c @@ -534,7 +534,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) |
