library: uptime API changes
Removed the printf_uptime, binaries can do printf easily enough. sprint_uptime split into two as there wasn't a lot of common code sprint_uptime(): old style uptime line sprint_uptime_short(): short new style "uptime -p" Hertz_hack needed this, no sane system uses the code (I think) so just assume 100 like we do in FreeBSD.
This commit is contained in:
@ -56,7 +56,7 @@
|
||||
#include "../proc/sysinfo.h"
|
||||
#include "../proc/version.h"
|
||||
#include "../proc/wchan.h"
|
||||
#include "../proc/whattime.h"
|
||||
#include "../proc/uptime.h"
|
||||
|
||||
#include "top.h"
|
||||
#include "top_nls.h"
|
||||
@ -5129,10 +5129,10 @@ static void summary_show (void) {
|
||||
// Display Uptime and Loadavg
|
||||
if (isROOM(View_LOADAV, 1)) {
|
||||
if (!Rc.mode_altscr)
|
||||
show_special(0, fmtmk(LOADAV_line, Myname, sprint_uptime(0)));
|
||||
show_special(0, fmtmk(LOADAV_line, Myname, sprint_uptime()));
|
||||
else
|
||||
show_special(0, fmtmk(CHKw(w, Show_TASKON)? LOADAV_line_alt : LOADAV_line
|
||||
, w->grpname, sprint_uptime(0)));
|
||||
, w->grpname, sprint_uptime()));
|
||||
Msg_row += 1;
|
||||
} // end: View_LOADAV
|
||||
|
||||
|
Reference in New Issue
Block a user