Paul Eggert wrote: > Thanks for doing all that work. I looked into it, and found a problem: a > command like "who /var/log/wtmp" stops working because the systemd > emulation of read_utmp only supports plain "who" (roughly equivalent to > "who /var/run/utmp" on Fedora).
Probably the FILE argument to 'who' and to 'users' should be deprecated? Since in systemd mode, the only supported value for FILE is /var/run/utmp. > Although I toyed with the idea of simplifying readutmp.h > further, by moving most of it into readutmp.c and having just struct > gl_utmp public (this would simplify coreutils quite a bit), I ran out of > time and patience and decided to ship what I had. Yes, I see how much contortions (strncpy etc.) these not-NUL-terminated strings cause. And two separate code paths, one for the systemd mode and one for all other platforms, is not ideal from the code coverage/testing/QA perspective either. I didn't tackle this, because before the add_utmp function existed, it would have caused many extra malloc() calls on all platforms. Bruno