aboutsummaryrefslogtreecommitdiff
path: root/login/programs
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2019-08-13 12:09:32 +0200
committerFlorian Weimer <fweimer@redhat.com>2019-08-13 12:09:32 +0200
commita33b817f13170b5c24263b92e7e09880fe797d7e (patch)
tree232dc87b4dcfaacf85cc9b01f9c72f5602e38307 /login/programs
parent9b9670fcd8ca92d6f53465e98173e3b33a76182c (diff)
downloadglibc-a33b817f13170b5c24263b92e7e09880fe797d7e.tar.xz
glibc-a33b817f13170b5c24263b92e7e09880fe797d7e.zip
login: Assume that _HAVE_UT_* constants are true
Make the GNU version of bits/utmp.h the generic version because all remaining ports use it (with a sysdeps override for Linux s390/s390x).
Diffstat (limited to 'login/programs')
-rw-r--r--login/programs/utmpdump.c46
1 files changed, 5 insertions, 41 deletions
diff --git a/login/programs/utmpdump.c b/login/programs/utmpdump.c
index 4c312f0939..85d8e31b43 100644
--- a/login/programs/utmpdump.c
+++ b/login/programs/utmpdump.c
@@ -37,47 +37,11 @@ print_entry (struct utmp *up)
temp_tv.tv_sec = up->ut_tv.tv_sec;
temp_tv.tv_usec = up->ut_tv.tv_usec;
- (printf) (
- /* The format string. */
-#if _HAVE_UT_TYPE
- "[%d] "
-#endif
-#if _HAVE_UT_PID
- "[%05d] "
-#endif
-#if _HAVE_UT_ID
- "[%-4.4s] "
-#endif
- "[%-8.8s] [%-12.12s]"
-#if _HAVE_UT_HOST
- " [%-16.16s]"
-#endif
- " [%-15.15s]"
-#if _HAVE_UT_TV
- " [%ld]"
-#endif
- "\n"
- /* The arguments. */
-#if _HAVE_UT_TYPE
- , up->ut_type
-#endif
-#if _HAVE_UT_PID
- , up->ut_pid
-#endif
-#if _HAVE_UT_ID
- , up->ut_id
-#endif
- , up->ut_user, up->ut_line
-#if _HAVE_UT_HOST
- , up->ut_host
-#endif
-#if _HAVE_UT_TV
- , 4 + ctime (&temp_tv.tv_sec)
- , (long int) temp_tv.tv_usec
-#else
- , 4 + ctime (&up->ut_time)
-#endif
- );
+ printf ("[%d] [%05d] [%-4.4s] [%-8.8s] [%-12.12s] [%-16.16s] [%-15.15s]"
+ " [%ld]\n",
+ up->ut_type, up->ut_pid, up->ut_id, up->ut_user, up->ut_line,
+ up->ut_host, 4 + ctime (&temp_tv.tv_sec),
+ (long int) temp_tv.tv_usec);
}
int