print include system error message when output fails

Users want to know why write fail - was it because disk full, or destination
read-only, or IO error, and so on.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
Sami Kerola 2015-12-04 20:35:35 +00:00
parent f5cd7383e4
commit 8fca82f148
No known key found for this signature in database
GPG key ID: A9553245FDE9B739
2 changed files with 13 additions and 13 deletions

View file

@ -405,7 +405,7 @@ void clean_up(void)
/* Just in case there something in buffers */
if (fflush(NULL))
error(0, 0, "clean_up: fflush");
error(EXIT_FAILURE, errno, "clean_up: fflush");
free(config.dhcpdconf_file);
free(config.dhcpdlease_file);
free(config.output_file);