summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1996-12-21 04:14:45 +0000
committerJim Meyering <jim@meyering.net>1996-12-21 04:14:45 +0000
commit41a41dd48e87dc309c16630f9a010273cd2e599d (patch)
tree414961477d07f0104feb277eac9f50e331d3a04b
parente59e2e803cbed18f035329cef6f6d0a949fb6c80 (diff)
downloadcoreutils-41a41dd48e87dc309c16630f9a010273cd2e599d.tar.xz
Replace hard-coded /etc/wtmp with WTMP_FILE. Suggestion from Eivind.
-rw-r--r--src/who-users.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/who-users.c b/src/who-users.c
index ec00d8c77..2cc153bd0 100644
--- a/src/who-users.c
+++ b/src/who-users.c
@@ -47,10 +47,14 @@
#include "system.h"
#include "error.h"
-#if !defined (UTMP_FILE) && defined (_PATH_UTMP) /* 4.4BSD. */
+#if !defined (UTMP_FILE) && defined (_PATH_UTMP)
#define UTMP_FILE _PATH_UTMP
#endif
+#if !defined (WTMP_FILE) && defined (_PATH_WTMP)
+#define WTMP_FILE _PATH_WTMP
+#endif
+
#if defined (UTMPX_FILE) /* Solaris, SysVr4 */
#undef UTMP_FILE
#define UTMP_FILE UTMPX_FILE
@@ -639,9 +643,9 @@ usage (int status)
--help display this help and exit\n\
--version output version information and exit\n\
\n\
-If FILE is not specified, use %s. /etc/wtmp as FILE is common.\n\
+If FILE is not specified, use %s. %s as FILE is common.\n\
If ARG1 ARG2 given, -m presumed: `am i' or `mom likes' are usual.\n\
-"), UTMP_FILE);
+"), UTMP_FILE, WTMP_FILE);
puts (_("\nReport bugs to sh-utils-bugs@gnu.ai.mit.edu"));
}
exit (status);
@@ -660,10 +664,11 @@ usage (int status)
printf (_("Usage: %s [OPTION]... [ FILE ]\n"), program_name);
printf (_("\
Output who is currently logged in according to FILE.\n\
-If FILE is not specified, use %s. /etc/wtmp as FILE is common.\n\
+If FILE is not specified, use %s. %s as FILE is common.\n\
\n\
--help display this help and exit\n\
- --version output version information and exit\n"), UTMP_FILE);
+ --version output version information and exit\n"),
+ UTMP_FILE, WTMP_FILE);
puts (_("\nReport bugs to sh-utils-bugs@gnu.ai.mit.edu"));
}
exit (status);