libfdisk: (gpt) don't ignore fsync() errors
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
8d503f85a8
commit
7eb23d8435
|
@ -2032,7 +2032,8 @@ static int gpt_write(struct fdisk_context *cxt, off_t offset, void *buf, size_t
|
|||
if (write_all(cxt->dev_fd, buf, count))
|
||||
return -errno;
|
||||
|
||||
fsync(cxt->dev_fd);
|
||||
if (fsync(cxt->dev_fd) != 0)
|
||||
return -errno;
|
||||
|
||||
DBG(GPT, ul_debug(" write OK [offset=%zu, size=%zu]",
|
||||
(size_t) offset, count));
|
||||
|
|
Loading…
Reference in New Issue