Fix compilation for 2.4 kernels (#1836)
[openwrt.git] / package / shfs / patches / 105-space_chars.patch
1 Index: shfs-0.35/shfs/Linux-2.4/shell.c
2 ===================================================================
3 --- shfs-0.35.orig/shfs/Linux-2.4/shell.c 2007-06-04 13:22:57.970042496 +0200
4 +++ shfs-0.35/shfs/Linux-2.4/shell.c 2007-06-04 13:22:59.249847936 +0200
5 @@ -213,6 +213,7 @@
6 int c = 0;
7 int is_space = 1;
8 int device = 0;
9 + char *start = s;
10
11 while (*s) {
12 if (c == DIR_COLS)
13 @@ -227,17 +228,20 @@
14 s++;
15 }
16 *s = '\0';
17 + start = s+1;
18 is_space = 1;
19 + } else {
20 + if (c != DIR_NAME)
21 + start = s+1;
22 }
23 } else {
24 if (is_space) {
25 /* (b)lock/(c)haracter device hack */
26 - col[c++] = s;
27 + col[c++] = start;
28 is_space = 0;
29 if ((c-1 == DIR_PERM) && ((*s == 'b')||(*s == 'c'))) {
30 device = 1;
31 }
32 -
33 }
34 }
35 s++;
36 Index: shfs-0.35/shfs/Linux-2.6/shell.c
37 ===================================================================
38 --- shfs-0.35.orig/shfs/Linux-2.6/shell.c 2007-06-04 13:22:57.977041432 +0200
39 +++ shfs-0.35/shfs/Linux-2.6/shell.c 2007-06-04 13:22:59.249847936 +0200
40 @@ -225,6 +225,7 @@
41 int c = 0;
42 int is_space = 1;
43 int device = 0;
44 + char *start = s;
45
46 while (*s) {
47 if (c == DIR_COLS)
48 @@ -239,17 +240,20 @@
49 s++;
50 }
51 *s = '\0';
52 + start = s+1;
53 is_space = 1;
54 + } else {
55 + if (c != DIR_NAME)
56 + start = s+1;
57 }
58 } else {
59 if (is_space) {
60 /* (b)lock/(c)haracter device hack */
61 - col[c++] = s;
62 + col[c++] = start;
63 is_space = 0;
64 if ((c-1 == DIR_PERM) && ((*s == 'b')||(*s == 'c'))) {
65 device = 1;
66 }
67 -
68 }
69 }
70 s++;
This page took 0.041536 seconds and 5 git commands to generate.