prepare busybox-power 1.19.3power3 release
[busybox-power] / debian / patches / ps-accept-and-ignore-missing-options.patch
1 Make "ps" accept (but ignore) all missing common options expected to be supported by "ps"
2 This is required to not break scripts which are using these options
3
4 By Dennis Groenen <tj.groenen@gmail.com> - 2011-08-19
5 ---
6
7 --- a/procps/ps.c
8 +++ b/procps/ps.c
9 @@ -633,7 +633,7 @@ int ps_main(int argc UNUSED_PARAM, char
10         /* -w is a bit complicated */
11         int w_count = 0;
12         opt_complementary = "-:ww";
13 -       opts = getopt32(argv, IF_SELINUX("Z")IF_FEATURE_SHOW_THREADS("T")"w", &w_count);
14 +       opts = getopt32(argv, IF_SELINUX("Z")IF_FEATURE_SHOW_THREADS("T")"w""ANdeagrxCGUgpstuUojOlFfsvuXVmMLScnfyH", &w_count, NULL);
15         /* if w is given once, GNU ps sets the width to 132,
16          * if w is given more than once, it is "unlimited"
17          */
18 @@ -648,7 +648,7 @@ int ps_main(int argc UNUSED_PARAM, char
19  # else
20         /* -w is not supported, only -Z and/or -T */
21         opt_complementary = "-";
22 -       opts = getopt32(argv, IF_SELINUX("Z")IF_FEATURE_SHOW_THREADS("T"));
23 +       opts = getopt32(argv, IF_SELINUX("Z")IF_FEATURE_SHOW_THREADS("T")"ANdeagrxCGUgpstuUojOlFfsvuXVmMLScnfyHw", NULL);
24  # endif
25  #endif
26