7869408d33cdf6b23b29f93ffafa680a2f2ace18
[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 @@ -645,7 +645,7 @@ int ps_main(int argc UNUSED_PARAM, char
10         int w_count = 0;
11         opt_complementary = "-:ww";
12         opts = getopt32(argv, IF_SELINUX("Z")IF_FEATURE_SHOW_THREADS("T")IF_FEATURE_PS_LONG("l")
13 -                                       "w", &w_count);
14 +                                       "w""ANdeagrxCGUgpstuUojOFfsvuXVmMLScnfyH", &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 @@ -660,7 +660,8 @@ 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")IF_FEATURE_PS_LONG("l"));
23 +       opts = getopt32(argv, IF_SELINUX("Z")IF_FEATURE_SHOW_THREADS("T")IF_FEATURE_PS_LONG("l")
24 +                                       "ANdeagrxCGUgpstuUojOFfsvuXVmMLScnfyHw", NULL);
25  # endif
26  
27  # if ENABLE_SELINUX