mirror of
https://github.com/troglobit/finit.git
synced 2026-10-10 16:52:39 +07:00
+3
-7
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user