Bug 5300 - CONFIG_FEATURE_PS_LONG uses linux-specific sysinfo(2)
Summary: CONFIG_FEATURE_PS_LONG uses linux-specific sysinfo(2)
Status: RESOLVED FIXED
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: All Other
: P5 minor
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-12 16:29 UTC by Michael Tokarev
Modified: 2012-06-13 00:52 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments
proposed patch (2.52 KB, patch)
2012-06-12 17:09 UTC, Michael Tokarev
Details

Note You need to log in before you can comment on or make changes to this bug.
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.