| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
* use Yes/No
* print all available information (columns)
* cleanup code
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
* don't build list, but directly create a string
* don't mix IDs and group names on output
* add SUPP-GIDS to print only IDs
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
| |
* check xasprintf() return code is unnecessary
* just check all scols_line_set_data() return codes on one place
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
|
|
|
|
| |
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
|
|
|
|
| |
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
|
|
|
|
| |
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
|
|
|
|
| |
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
|
|
|
|
| |
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
|
| |
|
|
|
|
| |
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
|
|
|
|
| |
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
|
|
|
|
| |
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
|
|
|
|
| |
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
|
|
|
|
| |
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
|
|
|
|
| |
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
|
|
|
|
|
|
|
|
| |
For this approach do not use the ioctl TIOCMGET anymore as this
is for real serial lines only. But switch over to use the ioctl
KDGKBMODE as this is unique to the virtual console lines only.
Signed-off-by: Werner Fink <werner@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
That is that there are several consoles, the /dev/ttyS0 which
is type of ibm3215 and a dumb terminal, then there is the device
/dev/3270/tty1 which can handle ANSI color escape sequences and is
a ibm327x terminal, and the /dev/ttyS1 which is a vt220 terminal.
The macro is_speed() in agetty.c allows to distinguish between the
terminal line (/dev)3270/tty1 and the speed options on the command
line used in
/run/systemd/generator/getty.target.wants/serial-getty@3270-tty1.service
which is a symbolic link to /usr/lib/systemd/system/serial-getty@.service
Signed-off-by: Werner Fink <werner@suse.de>
|
|
|
|
|
|
|
| |
Enable sulogin to find a suitable console device even if the first line
in /proc/consoles does not have any major and minor number.
Signed-off-by: Werner Fink <werner@suse.de>
|
|
|
|
|
|
|
|
| |
The nowadays used plymouth locks the devices used for the system
console which causes that agetty as well as sulogin can not modify
the termios settings of e.g. the serial devices of the systenm console.
Signed-off-by: Werner Fink <werner@suse.de>
|
|
|
|
|
|
| |
This affects option --time-format=notime.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
|
|
|
|
| |
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For no reason "full" did something else than "iso" or -F as you
see here:
$ ./last -f ../tests/ts/last/wtmp.LE --time-format=full | grep -A2 "no logout"
torvalds linux hobby Mon Aug 26 02:57:08 1991 gone - no logout
reboot system boot system-name Wed Aug 28 20:00:00 2013 still running
reboot system boot system-name Wed Aug 28 18:00:00 2013 - Wed Aug 28 19:00:00 2013 (01:00)
$ ./last -f ../tests/ts/last/wtmp.LE --time-format=iso | grep -A2 "no logout"
torvalds linux hobby 1991-08-26T02:57:08+0200 gone - no logout
reboot system boot system-name 2013-08-28T20:00:00+0200 still running
reboot system boot system-name 2013-08-28T18:00:00+0200 - 2013-08-28T19:00:00+0200 (01:00)
$ ./last -f ../tests/ts/last/wtmp.LE -F | grep -A2 "no logout"
torvalds linux hobby Mon Aug 26 02:57:08 1991 gone - no logout
reboot system boot system-name Wed Aug 28 20:00:00 2013 still running
reboot system boot system-name Wed Aug 28 18:00:00 2013 - Wed Aug 28 19:00:00 2013 (01:00)
Also note the useless leading space before "gone"
The only thing which matters is fmt->out width when printing these
strings like "still running". Now ctl->fulltime flag is unsused and
removed.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
|
|
|
|
|
|
| |
length was unset when using "last --time-format=iso"
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
|
|
|
|
|
|
|
|
| |
clock_gettime() needs -lrt, so let's keep this stuff
outside libcommon.la
Reported-by: Ruediger Meier <sweet_f_a@gmx.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
Protect a full stop (.), that begins or ends a string, with \&
Change '-' to '\-', if it indicates an option
Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change comma (,) to a period (.) as it is the control character
Use macro RB instead of the reverse one (BR)
Add missing [ in front of an (optional) option
Protect a full stop (.), that begins or ends a string, with \&
Change '-' to '\-', if it indicates an option
Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The /proc/<pid>/loginuid is not always available, and when so a running
session should not be determined to be gone. This is a regression from
commit mentioned in reference.
Sessions that have started before previous system boot, and did not log
out meanwhile, will be marked as gone. It is fair to say that these
sessions are most likely result of a wtmp corruption.
Reference: 404fa3f93c00c7e130f5a0ec963b2dc6a3743986
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
| |
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
|
|
|
|
| |
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
|
|
|
|
| |
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
|
|
|
|
| |
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
|
|
|
|
| |
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
|
|
|
|
| |
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
|
|
|
|
| |
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
|
|
|
|
| |
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The current code uses kill(0, caught_signal) after regular
signal cleanup and before exit (all just to make shells happy).
Unfortunately, kill(0, ...) is a bad idea. It seems better to use
kill(getpid(), ...) otherwise we kill our parent process too.
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1063887
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Earlier determination that used kill with signal zero to pid was prone to
false positive reports, due reuse of pid space and unrelated processes.
New function is_phantom() tries do a little bit better job, but fails to
be perfect. It seems linking to gether utmp session start time or
terminal id with /proc/<pid>/ information is not as simple as one might
hope.
Reported-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Let's use nanosleep() although if usleep() exists. The nanosleep
function does no interact with signals and other timers.
The patch introduces xusleep() as replacement to libc (or our fallback)
usleep(). Yes, we don't want to use struct timespec + nanosleep()
everywhere in code as nano-time resolution is useless for us.
The patch also enlarges delays in some busy wait loops. It seems
enough to try read/write 4x per second.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
|
|
|
|
|
|
| |
... it's more effective than call fstatat() for all device.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
| |
References: https://bugzilla.redhat.com/show_bug.cgi?id=1021108
Signed-off-by: Karel Zak <kzak@redhat.com>
|