sfdisk: make sure writes make it to disk in write_partitions()
Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=565946 Signed-off-by: Bryn M. Reeves <bmr@errorists.org> Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
4f74ffdbfe
commit
5ac78ead3c
|
@ -1637,6 +1637,11 @@ write_partitions(char *dev, int fd, struct disk_desc *z) {
|
|||
error(_("Failed writing the partition on %s\n"), dev);
|
||||
return 0;
|
||||
}
|
||||
if (fsync(fd)) {
|
||||
perror(dev);
|
||||
error(_("Failed writing the partition on %s\n"), dev);
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue