diff options
Diffstat (limited to 'procps/ps.c')
-rw-r--r-- | procps/ps.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/procps/ps.c b/procps/ps.c index 7f273d0a6..41e1b1e87 100644 --- a/procps/ps.c +++ b/procps/ps.c | |||
@@ -91,6 +91,8 @@ enum { MAX_WIDTH = 2*1024 }; | |||
91 | #if ENABLE_SELINUX | 91 | #if ENABLE_SELINUX |
92 | # define SELINUX_O_PREFIX "label," | 92 | # define SELINUX_O_PREFIX "label," |
93 | # define DEFAULT_O_STR (SELINUX_O_PREFIX "pid,user" IF_FEATURE_PS_TIME(",time") ",args") | 93 | # define DEFAULT_O_STR (SELINUX_O_PREFIX "pid,user" IF_FEATURE_PS_TIME(",time") ",args") |
94 | #elif ENABLE_PLATFORM_MINGW32 | ||
95 | # define DEFAULT_O_STR ("pid,comm") | ||
94 | #else | 96 | #else |
95 | # define DEFAULT_O_STR ("pid,user" IF_FEATURE_PS_TIME(",time") ",args") | 97 | # define DEFAULT_O_STR ("pid,user" IF_FEATURE_PS_TIME(",time") ",args") |
96 | #endif | 98 | #endif |
@@ -373,13 +375,19 @@ static void func_pcpu(char *buf, int size, const procps_status_t *ps) | |||
373 | 375 | ||
374 | static const ps_out_t out_spec[] = { | 376 | static const ps_out_t out_spec[] = { |
375 | /* Mandated by http://pubs.opengroup.org/onlinepubs/9699919799/utilities/ps.html: */ | 377 | /* Mandated by http://pubs.opengroup.org/onlinepubs/9699919799/utilities/ps.html: */ |
378 | #if !ENABLE_PLATFORM_MINGW32 | ||
376 | { 8 , "user" ,"USER" ,func_user ,PSSCAN_UIDGID }, | 379 | { 8 , "user" ,"USER" ,func_user ,PSSCAN_UIDGID }, |
377 | { 8 , "group" ,"GROUP" ,func_group ,PSSCAN_UIDGID }, | 380 | { 8 , "group" ,"GROUP" ,func_group ,PSSCAN_UIDGID }, |
381 | #endif | ||
378 | { 16 , "comm" ,"COMMAND",func_comm ,PSSCAN_COMM }, | 382 | { 16 , "comm" ,"COMMAND",func_comm ,PSSCAN_COMM }, |
383 | #if !ENABLE_PLATFORM_MINGW32 | ||
379 | { MAX_WIDTH , "args" ,"COMMAND",func_args ,PSSCAN_COMM }, | 384 | { MAX_WIDTH , "args" ,"COMMAND",func_args ,PSSCAN_COMM }, |
385 | #endif | ||
380 | { 5 , "pid" ,"PID" ,func_pid ,PSSCAN_PID }, | 386 | { 5 , "pid" ,"PID" ,func_pid ,PSSCAN_PID }, |
387 | #if !ENABLE_PLATFORM_MINGW32 | ||
381 | { 5 , "ppid" ,"PPID" ,func_ppid ,PSSCAN_PPID }, | 388 | { 5 , "ppid" ,"PPID" ,func_ppid ,PSSCAN_PPID }, |
382 | { 5 , "pgid" ,"PGID" ,func_pgid ,PSSCAN_PGID }, | 389 | { 5 , "pgid" ,"PGID" ,func_pgid ,PSSCAN_PGID }, |
390 | #endif | ||
383 | #if ENABLE_FEATURE_PS_TIME | 391 | #if ENABLE_FEATURE_PS_TIME |
384 | { sizeof("ELAPSED")-1, "etime" ,"ELAPSED",func_etime ,PSSCAN_START_TIME }, | 392 | { sizeof("ELAPSED")-1, "etime" ,"ELAPSED",func_etime ,PSSCAN_START_TIME }, |
385 | #endif | 393 | #endif |
@@ -392,11 +400,13 @@ static const ps_out_t out_spec[] = { | |||
392 | #if ENABLE_FEATURE_PS_TIME | 400 | #if ENABLE_FEATURE_PS_TIME |
393 | { 6 , "time" ,"TIME" ,func_time ,PSSCAN_STIME | PSSCAN_UTIME }, | 401 | { 6 , "time" ,"TIME" ,func_time ,PSSCAN_STIME | PSSCAN_UTIME }, |
394 | #endif | 402 | #endif |
403 | #if !ENABLE_PLATFORM_MINGW32 | ||
395 | { 6 , "tty" ,"TT" ,func_tty ,PSSCAN_TTY }, | 404 | { 6 , "tty" ,"TT" ,func_tty ,PSSCAN_TTY }, |
396 | { 4 , "vsz" ,"VSZ" ,func_vsz ,PSSCAN_VSZ }, | 405 | { 4 , "vsz" ,"VSZ" ,func_vsz ,PSSCAN_VSZ }, |
397 | /* Not mandated, but useful: */ | 406 | /* Not mandated, but useful: */ |
398 | { 4 , "stat" ,"STAT" ,func_stat ,PSSCAN_STAT }, | 407 | { 4 , "stat" ,"STAT" ,func_stat ,PSSCAN_STAT }, |
399 | { 4 , "rss" ,"RSS" ,func_rss ,PSSCAN_RSS }, | 408 | { 4 , "rss" ,"RSS" ,func_rss ,PSSCAN_RSS }, |
409 | #endif | ||
400 | #if ENABLE_SELINUX | 410 | #if ENABLE_SELINUX |
401 | { 35 , "label" ,"LABEL" ,func_label ,PSSCAN_CONTEXT }, | 411 | { 35 , "label" ,"LABEL" ,func_label ,PSSCAN_CONTEXT }, |
402 | #endif | 412 | #endif |