diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2007-06-25 11:07:11 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2007-06-25 11:07:11 +0000 |
commit | 489a777527ceca7c42c10f129d0803b08b471f8d (patch) | |
tree | a1ac32d3bf2498a9acf5455cdd1466e6fe74b796 /package/busybox | |
parent | ba2e7e02d16f12a9957ba10b06322102ac90427f (diff) | |
download | buildroot-novena-489a777527ceca7c42c10f129d0803b08b471f8d.tar.gz buildroot-novena-489a777527ceca7c42c10f129d0803b08b471f8d.zip |
- add post 1.6.0 fix
Diffstat (limited to 'package/busybox')
-rw-r--r-- | package/busybox/busybox-1.6.0-test.patch | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/package/busybox/busybox-1.6.0-test.patch b/package/busybox/busybox-1.6.0-test.patch new file mode 100644 index 000000000..a4503a2ea --- /dev/null +++ b/package/busybox/busybox-1.6.0-test.patch @@ -0,0 +1,70 @@ +--- busybox-1.6.0/coreutils/test.c 2007-06-01 13:48:34.000000000 +0200 ++++ /tmp/busybox_1_6_stable/coreutils/test.c 2007-06-25 12:29:55.000000000 +0200 +@@ -182,19 +182,23 @@ + int bb_test(int argc, char **argv) + { + int res; ++ char *arg0; ++ bool _off; + +- if (LONE_CHAR(argv[0], '[')) { ++ arg0 = strrchr(argv[0], '/'); ++ if (!arg0++) arg0 = argv[0]; ++ if (arg0[0] == '[') { + --argc; +- if (NOT_LONE_CHAR(argv[argc], ']')) { +- bb_error_msg("missing ]"); +- return 2; +- } +- argv[argc] = NULL; +- } else if (strcmp(argv[0], "[[") == 0) { +- --argc; +- if (strcmp(argv[argc], "]]")) { +- bb_error_msg("missing ]]"); +- return 2; ++ if (!arg0[1]) { /* "[" ? */ ++ if (NOT_LONE_CHAR(argv[argc], ']')) { ++ bb_error_msg("missing ]"); ++ return 2; ++ } ++ } else { /* assuming "[[" */ ++ if (strcmp(argv[argc], "]]") != 0) { ++ bb_error_msg("missing ]]"); ++ return 2; ++ } + } + argv[argc] = NULL; + } +@@ -219,15 +223,19 @@ + if (argc == 2) + return *argv[1] == '\0'; + //assert(argc); +- if (LONE_CHAR(argv[1], '!')) { +- bool _off; ++ /* remember if we saw argc==4 which wants *no* '!' test */ ++ _off = argc - 4; ++ if (_off ? ++ (LONE_CHAR(argv[1], '!')) ++ : (argv[1][0] != '!' || argv[1][1] != '\0')) ++ { + if (argc == 3) + return *argv[2] != '\0'; +- _off = argc - 4; ++ + t_lex(argv[2 + _off]); + if (t_wp_op && t_wp_op->op_type == BINOP) { + t_wp = &argv[1 + _off]; +- return binop() == 0; ++ return binop() == _off; + } + } + t_wp = &argv[1]; +@@ -378,7 +386,7 @@ + static int filstat(char *nm, enum token mode) + { + struct stat s; +- int i; ++ int i = i; /* gcc 3.x thinks it can be used uninitialized */ + + if (mode == FILSYM) { + #ifdef S_IFLNK |