Minor refactor

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2021-02-14 04:31:51 +01:00
parent 46bb09c331
commit e9a89248ec
2 changed files with 10 additions and 7 deletions
+3 -7
View File
@@ -23,18 +23,14 @@
#include "config.h"
#include <paths.h>
#include <time.h>
#include <utmp.h>
#include <arpa/inet.h>
#include <sys/utsname.h>
#include <lite/lite.h>
#include "helpers.h"
#ifndef _PATH_BTMP
#define _PATH_BTMP "/var/log/btmp"
#endif
#include "util.h"
#include "utmp-api.h"
#define MAX_NO 5
#define MAX_SZ 100 * 1024
@@ -128,7 +124,7 @@ void utmp_logrotate(void)
};
if (!has_utmp())
return 0;
return;
for (i = 0; files[i]; i++)
logrotate(files[i], MAX_NO, MAX_SZ);
+7
View File
@@ -24,6 +24,13 @@
#ifndef FINIT_UTMP_API_H_
#define FINIT_UTMP_API_H_
#include <paths.h>
#include <utmp.h>
#ifndef _PATH_BTMP
#define _PATH_BTMP "/var/log/btmp"
#endif
int utmp_set (int type, int pid, char *line, char *id, char *user);
int utmp_set_boot (void);
int utmp_set_halt (void);