log: remove unneeded truncate_log_file().
Michael
This commit is contained in:
parent
c07cd2e44e
commit
4a11f9f08f
12
src/log.c
12
src/log.c
@ -86,18 +86,6 @@ void close_log_file (void)
|
|||||||
log_file_fd = -1;
|
log_file_fd = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Truncate log file to a zero length.
|
|
||||||
*/
|
|
||||||
void truncate_log_file (void)
|
|
||||||
{
|
|
||||||
lseek (log_file_fd, 0, SEEK_SET);
|
|
||||||
if (ftruncate (log_file_fd, 0) != 0) {
|
|
||||||
log_message (LOG_WARNING,
|
|
||||||
"Unable to truncate log file to zero length");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set the log level for writing to the log file.
|
* Set the log level for writing to the log file.
|
||||||
*/
|
*/
|
||||||
|
@ -111,7 +111,6 @@
|
|||||||
|
|
||||||
extern int open_log_file (const char *file);
|
extern int open_log_file (const char *file);
|
||||||
extern void close_log_file (void);
|
extern void close_log_file (void);
|
||||||
extern void truncate_log_file (void);
|
|
||||||
|
|
||||||
extern void log_message (int level, const char *fmt, ...);
|
extern void log_message (int level, const char *fmt, ...);
|
||||||
extern void set_log_level (int level);
|
extern void set_log_level (int level);
|
||||||
|
Loading…
Reference in New Issue
Block a user