diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2005-04-03 11:37:43 +0000 |
---|---|---|
committer | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2005-04-03 11:37:43 +0000 |
commit | ef22bf3f6bf7290a6e72d38e8b1370ced38990f1 (patch) | |
tree | dfb578cd7405f0554c8c01f7e0b9125571ea7089 /openwrt/package/arpwatch/patches/010_debian_getopt_patchable | |
parent | acd06114dfa89d12a275022fae75015c29659f5b (diff) |
add arpwatch and nocatsplash
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@539 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'openwrt/package/arpwatch/patches/010_debian_getopt_patchable')
-rw-r--r-- | openwrt/package/arpwatch/patches/010_debian_getopt_patchable | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/openwrt/package/arpwatch/patches/010_debian_getopt_patchable b/openwrt/package/arpwatch/patches/010_debian_getopt_patchable new file mode 100644 index 000000000..7577e0b9f --- /dev/null +++ b/openwrt/package/arpwatch/patches/010_debian_getopt_patchable @@ -0,0 +1,87 @@ +Index: arpwatch/arpsnmp.c +diff -u arpwatch/arpsnmp.c:1.1.1.1 arpwatch/arpsnmp.c:1.1.1.1.2.1 +--- arpwatch/arpsnmp.c:1.1.1.1 Tue Apr 17 13:31:36 2001 ++++ arpwatch/arpsnmp.c Tue Apr 17 13:47:57 2001 +@@ -78,6 +78,10 @@ + register char *cp; + register int op, i; + char errbuf[256]; ++ char options[] = ++ "d" ++ "f:" ++ ; + + if ((cp = strrchr(argv[0], '/')) != NULL) + prog = cp + 1; +@@ -90,7 +94,7 @@ + } + + opterr = 0; +- while ((op = getopt(argc, argv, "df:")) != EOF) ++ while ((op = getopt(argc, argv, options)) != EOF) + switch (op) { + + case 'd': +@@ -181,9 +185,14 @@ + usage(void) + { + extern char version[]; ++ char usage[] = ++ "[-d] " ++ "[-f datafile] " ++ "file [...]\n" ++ ; + + (void)fprintf(stderr, "Version %s\n", version); + (void)fprintf(stderr, +- "usage: %s [-d] [-f datafile] file [...]\n", prog); ++ "usage: %s %s", prog, usage); + exit(1); + } +Index: arpwatch/arpwatch.c +diff -u arpwatch/arpwatch.c:1.1.1.1 arpwatch/arpwatch.c:1.1.1.1.2.1 +--- arpwatch/arpwatch.c:1.1.1.1 Tue Apr 17 13:31:36 2001 ++++ arpwatch/arpwatch.c Tue Apr 17 13:47:57 2001 +@@ -153,6 +153,14 @@ + register char *interface, *rfilename; + struct bpf_program code; + char errbuf[PCAP_ERRBUF_SIZE]; ++ char options[] = ++ "d" ++ "f:" ++ "i:" ++ "n:" ++ "N" ++ "r:" ++ ; + + if (argv[0] == NULL) + prog = "arpwatch"; +@@ -170,7 +178,7 @@ + interface = NULL; + rfilename = NULL; + pd = NULL; +- while ((op = getopt(argc, argv, "df:i:n:Nr:")) != EOF) ++ while ((op = getopt(argc, argv, options)) != EOF) + switch (op) { + + case 'd': +@@ -748,9 +756,16 @@ + usage(void) + { + extern char version[]; ++ char usage[] = ++ "[-dN] " ++ "[-f datafile] " ++ "[-i interface] " ++ "[-n net[/width]] " ++ "[-r file] " ++ "\n" ++ ; + + (void)fprintf(stderr, "Version %s\n", version); +- (void)fprintf(stderr, "usage: %s [-dN] [-f datafile] [-i interface]" +- " [-n net[/width]] [-r file]\n", prog); ++ (void)fprintf(stderr, "usage: %s %s", prog, usage); + exit(1); + } |