summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0127d40)
raw | patch | inline | side by side (parent: 0127d40)
author | tokkee <tokkee> | |
Sun, 4 Dec 2005 18:23:19 +0000 (18:23 +0000) | ||
committer | tokkee <tokkee> | |
Sun, 4 Dec 2005 18:23:19 +0000 (18:23 +0000) |
src/users.c | patch | blob | history |
diff --git a/src/users.c b/src/users.c
index f2808dd943ed630e36c9cff501e29b09a50cabea..36cea0fb4b4618826cdb7e13af49f4f1b9f6daca 100644 (file)
--- a/src/users.c
+++ b/src/users.c
#include "plugin.h"
#include "common.h"
-#include <utmp.h>
+#include <utmpx.h>
static char *rrd_file = "users.rrd";
void users_read(void)
{
unsigned int users = 0;
- unsigned int root = 0;
- struct utmp *entry = NULL;
+ struct utmpx *entry = NULL;
/* according to the *utent(3) man page none of the functions sets errno in
* case of an error, so we cannot do any error-checking here */
- setutent();
+ setutxent();
- while (NULL != (entry = getutent()))
+ while (NULL != (entry = getutxent()))
if (USER_PROCESS == entry->ut_type)
++users;
- endutent();
+ endutxent();
users_submit(users);
return;