summaryrefslogtreecommitdiffstats
path: root/meta/packages/busybox/busybox-1.9.1/sort-z-nul.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/busybox/busybox-1.9.1/sort-z-nul.patch')
-rw-r--r--meta/packages/busybox/busybox-1.9.1/sort-z-nul.patch50
1 files changed, 0 insertions, 50 deletions
diff --git a/meta/packages/busybox/busybox-1.9.1/sort-z-nul.patch b/meta/packages/busybox/busybox-1.9.1/sort-z-nul.patch
deleted file mode 100644
index 55452a4524..0000000000
--- a/meta/packages/busybox/busybox-1.9.1/sort-z-nul.patch
+++ /dev/null
@@ -1,50 +0,0 @@
1Summary: 0001591: inconsistent behavior of sort -z
2
3URL: http://busybox.net/bugs/view.php?id=1591
4http://www.busybox.net/cgi-bin/viewcvs.cgi/trunk/busybox/coreutils/sort.c?rev=21004&r1=20435&r2=21004&makepatch=1&diff_format=u
5
6Description:
7
8busybox sort -z does:
9use NUL instead of EOL on input
10
11GNU sort -z does:
12use NUL instead of EOL on input and output
13
14GNU sort -z documents:
15use NUL instead of EOL on input
16
17Additional Information:
18
19Note that sort -z is not part of any standard. But several applications
20(e. g. GNU findutils updatedb) depends on the NUL-on-output behavior.
21
22GNU sort documentation bug was reported to coreutils maintainers.
23
24Notes:
25
26vda 02-13-08 06:30 (0004364)
27Fixed in revision 21004. Thanks!
28
29--- busybox/coreutils/sort.c 2007/11/16 12:39:16 20435
30+++ busybox/coreutils/sort.c 2008/02/13 14:30:33 21004
31@@ -32,7 +32,7 @@
32 FLAG_u = 8, /* Unique */
33 FLAG_c = 0x10, /* Check: no output, exit(!ordered) */
34 FLAG_s = 0x20, /* Stable sort, no ascii fallback at end */
35- FLAG_z = 0x40, /* Input is null terminated, not \n */
36+ FLAG_z = 0x40, /* Input and output is NUL terminated, not \n */
37 /* These can be applied to search keys, the previous four can't */
38 FLAG_b = 0x80, /* Ignore leading blanks */
39 FLAG_r = 0x100, /* Reverse */
40@@ -396,8 +396,9 @@
41 if (linecount) linecount = flag+1;
42 }
43 /* Print it */
44+ flag = (option_mask32 & FLAG_z) ? '\0' : '\n';
45 for (i = 0; i < linecount; i++)
46- fprintf(outfile, "%s\n", lines[i]);
47+ fprintf(outfile, "%s%c", lines[i], flag);
48
49 fflush_stdout_and_exit(EXIT_SUCCESS);
50 }