Add in BB_FEATURE_CLEAN_UP, which is whether to clean up mem leaks and close
[oweals/busybox.git] / ps.c
diff --git a/ps.c b/ps.c
index 68213594460fc2e94563406fb4a7f767b7359193..b49b7ddd4e4973ef126db42f472699bb31924f63 100644 (file)
--- a/ps.c
+++ b/ps.c
@@ -114,7 +114,6 @@ static void parse_proc_status(char *S, proc_t * P)
 
 }
 
-
 extern int ps_main(int argc, char **argv)
 {
        proc_t p;
@@ -126,7 +125,7 @@ extern int ps_main(int argc, char **argv)
        char groupName[10] = "";
        int len, i, c;
 #ifdef BB_FEATURE_AUTOWIDTH
-       struct winsize win = { 0, 0 };
+       struct winsize win = { 0, 0, 0, 0 };
        int terminal_width = TERMINAL_WIDTH;
 #else
 #define terminal_width  TERMINAL_WIDTH
@@ -134,15 +133,6 @@ extern int ps_main(int argc, char **argv)
 
 
 
-       if (argc > 1 && strcmp(argv[1], dash_dash_help) == 0) {
-               usage ("ps\n"
-#ifndef BB_FEATURE_TRIVIAL_HELP
-                               "\nReport process status\n"
-                               "\nThis version of ps accepts no options.\n"
-#endif
-                               );
-       }
-
        dir = opendir("/proc");
        if (!dir)
                fatalError("Can't open /proc\n");
@@ -216,14 +206,14 @@ extern int ps_main(int argc, char **argv)
        char uidName[10] = "";
        char groupName[10] = "";
 #ifdef BB_FEATURE_AUTOWIDTH
-       struct winsize win = { 0, 0 };
+       struct winsize win = { 0, 0, 0, 0 };
        int terminal_width = TERMINAL_WIDTH;
 #else
 #define terminal_width  TERMINAL_WIDTH
 #endif
 
        if (argc > 1 && **(argv + 1) == '-') 
-               usage("ps-devps\n\nReport process status\n\nThis version of ps accepts no options.\n\n");
+               usage(ps_usage);
 
        /* open device */ 
        fd = open(device, O_RDONLY);