* lib/readutmp.c (read_utmp): Fail if not UTMP_FILE.
* m4/systemd.m4 (gl_SYSTEMD_CHOICE): Default to no for now,
since yes means "who /var/log/wtmp" stops working.
2023-08-03 Paul Eggert <eggert@cs.ucla.edu>
+ readutmp: systemd supports only UTMP_FILE
+ * lib/readutmp.c (read_utmp): Fail if not UTMP_FILE.
+ * m4/systemd.m4 (gl_SYSTEMD_CHOICE): Default to no for now,
+ since yes means "who /var/log/wtmp" stops working.
+
readutmp: switch new struct to struct timespec
* lib/readutmp.c (get_boot_time_uncached, get_boot_time)
(add_utmp, read_utmp):
read_utmp (char const *file, idx_t *n_entries, STRUCT_UTMP **utmp_buf,
int options)
{
+ /* The current implementation can imitate only UTMP_FILE. */
+ if (strcmp (file, UTMP_FILE) != 0)
+ {
+ errno = ENOTSUP;
+ return -1;
+ }
+
/* Fill entries, simulating what a utmp file would contain. */
struct utmp_alloc a = {0};
-# systemd.m4 serial 1
+# systemd.m4 serial 2
dnl Copyright (C) 2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
[
AC_MSG_CHECKING([whether to use systemd APIs])
AC_ARG_ENABLE([systemd],
- [ --disable-systemd do not use systemd APIs],
+ [ --enable-systemd use systemd APIs],
[SYSTEMD_CHOICE="$enableval"],
- [SYSTEMD_CHOICE=yes])
+ [SYSTEMD_CHOICE=no])
AC_MSG_RESULT([$SYSTEMD_CHOICE])
AC_SUBST([SYSTEMD_CHOICE])
])