Commit Graph

10 Commits

Author SHA1 Message Date
Kyle Laker
5979696ada whattime: Fix formatting
Update formatting within the if block to two spaces
2017-09-23 17:32:29 +10:00
Kyle Laker
325d68b7c3 whattime: Show 0 minutes in pretty output
When supplying the -p command to uptime, it does not display any
sections where the value is less than 1; however, after a reboot, this
causes the command to just output "up". Showing 0 minutes when the
system has been up for less than a minute makes it clear a reboot just
occurred.
2017-09-23 17:32:29 +10:00
Jaromir Capik
38cbeedeb7 library: fixing uninitialized variable 'pos' in whattime.c 2014-01-02 18:21:31 +01:00
Craig Small
5e4d9d5a92 Merge commit 'refs/merge-requests/2' of git://gitorious.org/procps/procps into merge-requests/2
Conflicts:
	uptime.c
2013-09-11 20:50:48 +10:00
Sami Kerola
ce61089059 docs: clarification to license headers in files
Add license header to all files.  The summary of licensing is below,
taken from Craig Small's email which is referred in commit message
tail.

sysctl and pgrep are GPL 2+
The rest is LGPL 2.1+

Reference: http://www.freelists.org/post/procps/Incorrect-FSF-address-in-the-license-files,8
Bug-Redhat: https://bugzilla.redhat.com/show_bug.cgi?id=797962
CC: Craig Small <csmall@enc.com.au>
CC: Jaromir Capik <jcapik@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-03-03 18:41:11 +11:00
David Cantrell
3e7f78d296 Add -p|--pretty option to uptime(1) for pretty output.
This patch adds the -p option to the uptime(1) command, which changes
the uptime displayed from something like:

 10:35:52 up  2:33,  1 user,  load average: 1.69, 1.65, 1.63

to:

 up 2 hours, 33 minutes

I originally implemented this as the up(1) program about 14 years ago.
In 2008 or 2009, I created a patch for procps to add this functionality
to uptime and submitted it to the project.  Never heard from the
project and no new releases of procps had been made.  Then I found out
about this project and decided to port my patch to it.  So here it is.

This is really just for fun.  There is no real technical reason to
have this functionality.  But even now, 14 years later, I still get
emails asking where the source code for up is.  So I thought it would
be nice for the uptime command on Linux to sport the up functionality
by default.
2012-02-22 10:35:12 -05:00
albert
c961f2604a leftovers in the 3.2.4 release 2004-11-04 20:50:59 +00:00
albert
465708e3f9 perfect but for extra /usr/bin/kill 2002-10-10 22:40:35 +00:00
csmall
e4c67b2724 Put most of the Debian patches in
added a lot of cvsignore files
2002-02-01 23:40:38 +00:00
csmall
03a9b5a30f procps 010114 2002-02-01 22:47:29 +00:00