Lines Matching defs:le
198 klog_rotate(struct log_entry *le)
215 if (le->lfu_rotate_period == K_LOG_DEF_FILE_ROTATE_PERIOD)
220 if (t >= le->lfu_last_rotated + le->lfu_rotate_period) {
227 name_buf1 = malloc(strlen(le->lfu_fname) + 32);
232 name_buf2 = malloc(strlen(le->lfu_fname) + 32);
246 (void) sprintf(new_name, "%s.%d", le->lfu_fname,
247 le->lfu_rotate_versions - 1);
253 for (i = le->lfu_rotate_versions - 1; i > 0; i--) {
254 (void) sprintf(old_name, "%s.%d", le->lfu_fname, i - 1);
266 old_name = le->lfu_fname;
277 le->lfu_last_rotated = t;
286 fp = fopen(old_name, le->lfu_fopen_mode);
292 (void) fclose(le->lfu_filep);
293 le->lfu_filep = fp;
302 if (le->lfu_rotate_versions <= 0)