summaryrefslogtreecommitdiffstats
path: root/urunlevel/my_linux/my_linux.patch
diff options
context:
space:
mode:
Diffstat (limited to 'urunlevel/my_linux/my_linux.patch')
-rw-r--r--urunlevel/my_linux/my_linux.patch61
1 files changed, 61 insertions, 0 deletions
diff --git a/urunlevel/my_linux/my_linux.patch b/urunlevel/my_linux/my_linux.patch
new file mode 100644
index 0000000..a923ddf
--- /dev/null
+++ b/urunlevel/my_linux/my_linux.patch
@@ -0,0 +1,61 @@
1diff -urNX busybox-1.00/runlevel/diff_excludes busybox-1.00-original/archival/gzip.c busybox-1.00/archival/gzip.c
2--- busybox-1.00-original/archival/gzip.c 2004-04-15 03:51:08.000000000 +1000
3+++ busybox-1.00/archival/gzip.c 2005-02-08 19:05:02.000000000 +1000
4@@ -13,6 +13,9 @@
5 * files as well as stdin/stdout, and to generally behave itself wrt
6 * command line handling.
7 *
8+ * Adjusted further by David Seikel <won_fang@yahoo.cam.au> to support
9+ * just storing the file.
10+ *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14@@ -72,6 +75,8 @@
15 /* methods 4 to 7 reserved */
16 #define DEFLATED 8
17
18+int just_store = 0;
19+
20 /* To save memory for 16 bit systems, some arrays are overlaid between
21 * the various modules:
22 * deflate: prev+head window d_buf l_buf outbuf
23@@ -1202,7 +1207,7 @@
24 int force = 0;
25 int opt;
26
27- while ((opt = getopt(argc, argv, "cf123456789dq")) != -1) {
28+ while ((opt = getopt(argc, argv, "cf0123456789dq")) != -1) {
29 switch (opt) {
30 case 'c':
31 tostdout = 1;
32@@ -1210,6 +1215,11 @@
33 case 'f':
34 force = 1;
35 break;
36+
37+ case '0':
38+ just_store = 1;
39+ break;
40+
41 /* Ignore 1-9 (compression level) options */
42 case '1':
43 case '2':
44@@ -2267,7 +2277,7 @@
45 * and if the zip file can be seeked (to rewrite the local header),
46 * the whole file is transformed into a stored file:
47 */
48- if (stored_len <= opt_lenb && eof && compressed_len == 0L && seekable()) {
49+ if ((just_store || (stored_len <= opt_lenb)) && eof && compressed_len == 0L && seekable()) {
50 /* Since LIT_BUFSIZE <= 2*WSIZE, the input data must be there: */
51 if (buf == (char *) 0)
52 bb_error_msg("block vanished");
53@@ -2276,7 +2286,7 @@
54 compressed_len = stored_len << 3;
55 *file_method = STORED;
56
57- } else if (stored_len + 4 <= opt_lenb && buf != (char *) 0) {
58+ } else if ((just_store || (stored_len + 4 <= opt_lenb)) && buf != (char *) 0) {
59 /* 4: two words for the lengths */
60 /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.
61 * Otherwise we can't have processed more than WSIZE input bytes since