diff options
author | Ruediger Meier | 2015-03-24 14:38:09 +0100 |
---|---|---|
committer | Ruediger Meier | 2015-03-25 10:36:49 +0100 |
commit | 568f460ca3c4ca1fff0c2c7e325a1b709992188c (patch) | |
tree | 0dde0ce7ead92f311d24787acdbb057cb05b3011 /login-utils/last.c | |
parent | fsck: fix fsck -C {fd} parsing (diff) | |
download | kernel-qcow2-util-linux-568f460ca3c4ca1fff0c2c7e325a1b709992188c.tar.gz kernel-qcow2-util-linux-568f460ca3c4ca1fff0c2c7e325a1b709992188c.tar.xz kernel-qcow2-util-linux-568f460ca3c4ca1fff0c2c7e325a1b709992188c.zip |
last: fix first (current) runlevel line
Since 744c7fec lastrch was not set to current time anymore, but we need it.
# broken:
$ ./last -x | grep -m 2 runlevel
runlevel (to lvl 5) 3.11.10-25-deskt Wed Feb 18 13:11 - 01:00 (-16484+-12:-11)
runlevel (to lvl 5) 3.11.10-25-deskt Thu Jan 22 16:50 - 13:11 (26+20:21)
# fixed:
$ ./last -x | grep -m 2 runlevel
runlevel (to lvl 5) 3.11.10-25-deskt Wed Feb 18 13:11 still running
runlevel (to lvl 5) 3.11.10-25-deskt Thu Jan 22 16:50 - 13:11 (26+20:21)
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Diffstat (limited to 'login-utils/last.c')
-rw-r--r-- | login-utils/last.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/login-utils/last.c b/login-utils/last.c index 9682764f0..4a165c2c1 100644 --- a/login-utils/last.c +++ b/login-utils/last.c @@ -638,7 +638,7 @@ static void process_wtmp_file(const struct last_control *ctl, /* * Fill in 'lastdate' */ - lastdate = lastdown; + lastdate = lastrch = lastdown; /* * Install signal handlers |