From ef22bf3f6bf7290a6e72d38e8b1370ced38990f1 Mon Sep 17 00:00:00 2001 From: nbd Date: Sun, 3 Apr 2005 11:37:43 +0000 Subject: add arpwatch and nocatsplash git-svn-id: svn://svn.openwrt.org/openwrt/trunk@539 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../arpwatch/patches/010_debian_getopt_patchable | 87 ++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 openwrt/package/arpwatch/patches/010_debian_getopt_patchable (limited to 'openwrt/package/arpwatch/patches/010_debian_getopt_patchable') 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); + } -- cgit v1.2.3