aboutsummaryrefslogtreecommitdiff
path: root/src/utmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/utmp.c')
-rw-r--r--src/utmp.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/utmp.c b/src/utmp.c
index 6aed568..b2a232f 100644
--- a/src/utmp.c
+++ b/src/utmp.c
@@ -105,18 +105,16 @@ fill_utmp (UTMPX *utmp,
#endif
}
-
-int wtmpxreboot = 0;
-
void
write_wtmpx (int type, const char *user, const char *id, pid_t pid,
const char *line)
{
UTMPX utmp;
+ static int wtmpxreboot = 0;
+ debug (2, (_("cannot open %s for writing"), WTMP_FILE));
if (access (WTMP_FILE, W_OK))
{
- logmsg (LOG_NOTICE, _("cannot open %s for writing"), WTMP_FILE);
if (type == BOOT_TIME)
wtmpxreboot++;
return;
@@ -131,17 +129,16 @@ write_wtmpx (int type, const char *user, const char *id, pid_t pid,
pies_updwtmpx (WTMP_FILE, &utmp);
}
-int utmpreboot = 0;
-
void
write_utmpx (int type, const char *user, const char *id, pid_t pid,
const char *line)
{
UTMPX utmp;
+ static int utmpreboot = 0;
if (access (UTMP_FILE, W_OK))
{
- logmsg (LOG_NOTICE, _("cannot open %s for writing"), UTMP_FILE);
+ debug (1, (_("cannot open %s for writing"), UTMP_FILE));
if (type == BOOT_TIME)
utmpreboot++;
return;

Return to:

Send suggestions and report system problems to the System administrator.