diff --git a/ChangeLog b/ChangeLog index c39cf22498..8d9cc18771 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Wed Nov 28 14:21:47 CET 2007 Jim Meyering + + * src/virsh.c (vshCloseLogFile): Diagnose close/write failure. + Wed Nov 28 09:00:00 GMT 2007 Richard W.M. Jones * src/xm_internal.c, src/xm_internal.h: Added support for diff --git a/src/virsh.c b/src/virsh.c index 5b50524962..86f5b8b368 100644 --- a/src/virsh.c +++ b/src/virsh.c @@ -4643,7 +4643,9 @@ vshCloseLogFile(vshControl *ctl) { /* log file close */ if (ctl->log_fd >= 0) { - close(ctl->log_fd); + if (close(ctl->log_fd) < 0) + vshError(ctl, FALSE, _("%s: failed to write log file: %s") + ctl->logfile ? ctl->logfile : "?", strerror (errno)); ctl->log_fd = -1; }