coreutils/coreutils-6.10-longoptions.patch
Ondrej Vasik 5d66c4cfdf various changes(colors in ls, ACL/scontext in ls, longoptions for
echo/sleep), see changelog for details
2008-01-31 15:55:47 +00:00

28 lines
1.0 KiB
Diff

diff -urp coreutils-6.10-orig/src/echo.c coreutils-6.10/src/echo.c
--- coreutils-6.10-orig/src/echo.c 2007-11-25 14:23:31.000000000 +0100
+++ coreutils-6.10/src/echo.c 2008-01-31 14:01:52.000000000 +0100
@@ -163,6 +163,10 @@ main (int argc, char **argv)
{
case 'e': case 'E': case 'n':
break;
+ case '-':
+ /* end of short options(allows to print -n,-e or -E) */
+ argc--;
+ argv++;
default:
goto just_echo;
}
diff -urp coreutils-6.10-orig/lib/long-options.c coreutils-6.10/lib/long-options.c
--- coreutils-6.10-orig/lib/long-options.c 2007-10-17 15:47:26.000000000 +0200
+++ coreutils-6.10/lib/long-options.c 2008-01-31 14:28:01.000000000 +0100
@@ -57,8 +57,7 @@ parse_long_options (int argc,
/* Don't print an error message for unrecognized options. */
opterr = 0;
- if (argc == 2
- && (c = getopt_long (argc, argv, "+", long_options, NULL)) != -1)
+ while ((c = getopt_long (argc, argv, "+", long_options, NULL)) != -1)
{
switch (c)
{