Bug 5300

Summary: CONFIG_FEATURE_PS_LONG uses linux-specific sysinfo(2)
Product: Busybox Reporter: Michael Tokarev <mjt+busybox>
Component: OtherAssignee: unassigned
Status: RESOLVED FIXED    
Severity: minor CC: busybox-cvs
Priority: P5    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: Other   
Host: Target:
Build:
Attachments: proposed patch

Description Michael Tokarev 2012-06-12 16:29:13 UTC
Current !DESKTOP ps -w implementation uses sysinfo(2) syscall, which does not work on anything but linux.

Apparently we don't have -w working anymore: neither desktop nor !desktop... :(
Comment 1 Michael Tokarev 2012-06-12 16:35:32 UTC
I mean no working -l ofcourse.  -w does not work too, in DESKTOP case.
Comment 2 Michael Tokarev 2012-06-12 17:09:44 UTC
Created attachment 4376 [details]
proposed patch
Comment 3 Michael Tokarev 2012-06-12 17:10:59 UTC
Apparently this whole thing is fsck'd up.  This patch at least makes it compilable on freebsd.  DESKTOP case is still non-functional.
Comment 4 Denys Vlasenko 2012-06-13 00:52:59 UTC
Fixed in git:

commit ac42e3de90ebf4b921035893e3670da63cad882c
Author: Michael Tokarev <mjt@tls.msk.ru>
Date:   Wed Jun 13 02:51:56 2012 +0200

    ps: use separate get_uptime() and make it work on non-linux too

    Create get_uptime() function in procps/ps.c, and use it rather than
    relying on linux-specific sysinfo() inline.