aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatheus Izvekov <mizvekov@gmail.com>2010-01-19 18:44:15 -0200
committerDenys Vlasenko <vda.linux@googlemail.com>2010-01-20 02:46:39 +0100
commit2e5fa4a69d49646d928041ebd20bbe659b6d8260 (patch)
tree8bca34f34b254878bde2dea8ec906551903623b0
parent94a6fd1eeb185f8fea5c0906553552fb2a8aa8d0 (diff)
downloadbusybox-w32-2e5fa4a69d49646d928041ebd20bbe659b6d8260.tar.gz
busybox-w32-2e5fa4a69d49646d928041ebd20bbe659b6d8260.tar.bz2
busybox-w32-2e5fa4a69d49646d928041ebd20bbe659b6d8260.zip
patch: ignore flag -g. +22 bytes
Signed-off-by: Matheus Izvekov <mizvekov@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--editors/patch.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/editors/patch.c b/editors/patch.c
index 580ee147c..ab3af3ce7 100644
--- a/editors/patch.c
+++ b/editors/patch.c
@@ -85,9 +85,11 @@ int patch_main(int argc UNUSED_PARAM, char **argv)
85 { 85 {
86 const char *p = "-1"; 86 const char *p = "-1";
87 const char *i = "-"; /* compat */ 87 const char *i = "-"; /* compat */
88 const char *g; /* unimplemented, default is "0" */
88#if ENABLE_LONG_OPTS 89#if ENABLE_LONG_OPTS
89 static const char patch_longopts[] ALIGN1 = 90 static const char patch_longopts[] ALIGN1 =
90 "strip\0" Required_argument "p" 91 "strip\0" Required_argument "p"
92 "get\0" Required_argument "g"
91 "input\0" Required_argument "i" 93 "input\0" Required_argument "i"
92 "reverse\0" No_argument "R" 94 "reverse\0" No_argument "R"
93 "forward\0" No_argument "N" 95 "forward\0" No_argument "N"
@@ -95,7 +97,7 @@ int patch_main(int argc UNUSED_PARAM, char **argv)
95 ; 97 ;
96 applet_long_options = patch_longopts; 98 applet_long_options = patch_longopts;
97#endif 99#endif
98 opt = getopt32(argv, "p:i:RN", &p, &i); 100 opt = getopt32(argv, "p:i:RNg:", &p, &i, &g);
99 if (opt & OPT_R) 101 if (opt & OPT_R)
100 plus = '-'; 102 plus = '-';
101 patch_level = xatoi(p); /* can be negative! */ 103 patch_level = xatoi(p); /* can be negative! */