From 4aca87515a5083ae0e31ce3177189fd43b6d05ac Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sat, 3 Jan 2015 13:58:15 +0100 Subject: patch to Vanilla Tomato 1.28 --- release/src/router/busybox/pgrep.c | 45 -------------------------------------- 1 file changed, 45 deletions(-) delete mode 100644 release/src/router/busybox/pgrep.c (limited to 'release/src/router/busybox/pgrep.c') diff --git a/release/src/router/busybox/pgrep.c b/release/src/router/busybox/pgrep.c deleted file mode 100644 index c3ed21a0..00000000 --- a/release/src/router/busybox/pgrep.c +++ /dev/null @@ -1,45 +0,0 @@ -#include -#include -#include -#include /* for strerror() */ -#include -#include "busybox.h" - - -extern int optind; /* in unistd.h */ -extern int errno; /* for use with strerror() */ -static char *opt_pattern = NULL; - -extern int pgrep_main(int argc, char **argv) -{ - int opt; - pid_t* pidList; - - /* do normal option parsing */ - while ((opt = getopt(argc, argv, "f")) > 0) { - switch (opt) { - case 'f': - break; - default: - show_usage(); - } - } - - if (argc - optind == 1) - opt_pattern = argv[optind]; - - if (!opt_pattern) - show_usage(); - - pidList = find_pid_by_name(opt_pattern); - - if (!pidList || *pidList<=0) { - return EXIT_SUCCESS; - } - - for(; pidList && *pidList!=0; pidList++) { - printf("%d\n", *pidList); - } - - return EXIT_SUCCESS; -} -- cgit v1.2.3-54-g00ecf