zopencommunity / coreutilsport

A collection of basic Unix utilities
Apache License 2.0
0 stars 3 forks source link

uptime/users/who fail because of /etc/utmp: EDC5121I Invalid argument #39

Closed IgorTodorovskiIBM closed 1 year ago

IgorTodorovskiIBM commented 1 year ago

Culprit appears to be:

fopen (file, "re");

in readutmp.c.

JrEdc1opsEinval02: The mode argument passed to fopen() or freopen() contained
more information than just the open mode, but did not use a comma to separate
the additional keywords.
IgorTodorovskiIBM commented 1 year ago

Another issue: By default coreutils processes /etc/utmp. Changing it to /etc/utmpx helps, but the strings being returned from getutxent are in EBCDIC. We may need to override getutxent/setutxent in zoslib as there are quite a few tools that use these functions.

MikeFultonDev commented 1 year ago

closing since code merged for it. @IgorTodorovskiIBM re-open if necessary