[PATCH 25/33] mkfs.bfs: check writing to a file descriptor was successful

Sami Kerola
2013-04-13T19:56:17Z

disk-utils/mkfs.bfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/disk-utils/mkfs.bfs.c b/disk-utils/mkfs.bfs.c
index 0a296f3..6f11bf7 100644
--- a/disk-utils/mkfs.bfs.c
+++ b/disk-utils/mkfs.bfs.c
@@ -289,7 +289,7 @@ int main(int argc, char **argv)
if (write(fd, &de, sizeof(de)) != sizeof(de))
err(EXIT_FAILURE, _("error writing .. entry"));

- if (close(fd) < 0)
+ if (close_fd(fd) != 0)
err(EXIT_FAILURE, _("error closing %s"), device);

return EXIT_SUCCESS;
--
1.8.2.1