Don't call close on fd (dump_log): Use g_critical on error conditions
2001-06-21 Bradford Hovinen <hovinen@ximian.com> * config-log.c (dump_log): Don't call close on fd (dump_log): Use g_critical on error conditions rather than g_warning
This commit is contained in:
parent
f707e7350e
commit
93e004a93f
2 changed files with 12 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
2001-06-21 Bradford Hovinen <hovinen@ximian.com>
|
||||
|
||||
* config-log.c (dump_log): Don't call close on fd
|
||||
(dump_log): Use g_critical on error conditions rather than g_warning
|
||||
|
||||
2001-06-20 Bradford Hovinen <hovinen@ximian.com>
|
||||
|
||||
* config-log.c (slave_data_cb): Dump the log after loading it from
|
||||
|
|
|
@ -1030,8 +1030,8 @@ dump_log (ConfigLog *config_log)
|
|||
out_fd = open (filename_out, O_CREAT | O_WRONLY | O_TRUNC, 0600);
|
||||
|
||||
if (out_fd == -1) {
|
||||
g_warning ("Could not open output file: %s",
|
||||
g_strerror (errno));
|
||||
g_critical ("Could not open output file: %s",
|
||||
g_strerror (errno));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1050,7 +1050,6 @@ dump_log (ConfigLog *config_log)
|
|||
}
|
||||
|
||||
io_buffer_destroy (output);
|
||||
close (out_fd);
|
||||
|
||||
if (config_log->p->filename)
|
||||
rename (filename_out, config_log->p->filename);
|
||||
|
@ -1058,6 +1057,11 @@ dump_log (ConfigLog *config_log)
|
|||
DEBUG_MSG ("Exit");
|
||||
}
|
||||
|
||||
/* Return TRUE if the config log has entries made by actual configuration
|
||||
* changes, as opposed to default values placed there when the location was
|
||||
* initialized
|
||||
*/
|
||||
|
||||
static gboolean
|
||||
has_nondefaults (ConfigLog *config_log)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue