diff options
author | Felix Fietkau <nbd@openwrt.org> | 2005-04-03 11:37:43 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2005-04-03 11:37:43 +0000 |
commit | 929767a11fa86ee1395b6fe228146f0344842e62 (patch) | |
tree | 1590fde3a966c15c3e442f8caef7b0a0b94b892d /package/arpwatch/patches/010_debian_getopt_patchable | |
parent | 01c41802760e45238372bfe23c8cb8b9f9c2e69d (diff) | |
download | master-187ad058-929767a11fa86ee1395b6fe228146f0344842e62.tar.gz master-187ad058-929767a11fa86ee1395b6fe228146f0344842e62.tar.bz2 master-187ad058-929767a11fa86ee1395b6fe228146f0344842e62.zip |
add arpwatch and nocatsplash
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@539 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/arpwatch/patches/010_debian_getopt_patchable')
-rw-r--r-- | package/arpwatch/patches/010_debian_getopt_patchable | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/package/arpwatch/patches/010_debian_getopt_patchable b/package/arpwatch/patches/010_debian_getopt_patchable new file mode 100644 index 0000000000..7577e0b9ff --- /dev/null +++ b/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); + } |