Browse Source

+ f2b_logfile_rotated()

master
Zubrikhin Alexey 8 years ago
parent
commit
c37f3a5825
  1. 15
      src/logfile.c

15
src/logfile.c

@ -37,7 +37,20 @@ f2b_logfile_close(const f2b_logfile_t *file) {
}
bool
f2b_logfile_rotated(const f2b_logfile_t *file);
f2b_logfile_rotated(const f2b_logfile_t *file) {
struct stat st;
assert(file != NULL);
if (stat(file->path, &st) != 0)
return true;
if (file->st.st_dev != st.st_dev ||
file->st.st_ino != st.st_ino)
return true;
return false;
}
ssize_t
f2b_logfile_getline(const f2b_logfile_t *file, const char *buf, size_t bufsize) {

Loading…
Cancel
Save