summaryrefslogtreecommitdiffstats
path: root/disk-utils/partx.c
diff options
context:
space:
mode:
Diffstat (limited to 'disk-utils/partx.c')
-rw-r--r--disk-utils/partx.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/disk-utils/partx.c b/disk-utils/partx.c
index 49ef1dc84..b93ddf3ef 100644
--- a/disk-utils/partx.c
+++ b/disk-utils/partx.c
@@ -987,6 +987,8 @@ int main(int argc, char **argv)
if (loopdev)
loopcxt_deinit(&lc);
- close(fd);
+ if (close_fd(fd) != 0)
+ err(EXIT_FAILURE, _("write failed"));
+
return rc ? EXIT_FAILURE : EXIT_SUCCESS;
}