wok-next rev 1397
busybox: fix gzipped module insertion
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Sep 19 15:24:31 2008 +0000 (2008-09-19) |
parents | ccf334bab936 |
children | fa8bcceddce2 |
files | busybox/stuff/busybox-1.12.0-zmodules.u |
line diff
1.1 --- a/busybox/stuff/busybox-1.12.0-zmodules.u Thu Sep 18 12:42:13 2008 +0200 1.2 +++ b/busybox/stuff/busybox-1.12.0-zmodules.u Fri Sep 19 15:24:31 2008 +0000 1.3 @@ -50,7 +50,7 @@ 1.4 #include <libgen.h> 1.5 #include <sys/utsname.h> 1.6 1.7 -@@ -4212,6 +4213,45 @@ static const char *moderror(int err) 1.8 +@@ -4212,6 +4213,48 @@ static const char *moderror(int err) 1.9 } 1.10 } 1.11 1.12 @@ -68,6 +68,9 @@ 1.13 + xread(fd,head,sizeof(head)); 1.14 + lseek(fd,0L,SEEK_SET); 1.15 + if (head[0] == 0x1f && head[1] == 0x8b) { /* gzip */ 1.16 ++#if BB_MMU 1.17 ++ xread(fd,head,2); // bb wierdness... 1.18 ++#endif 1.19 + open_transformer(fd, unpack_gz_stream, "gunzip"); 1.20 + } 1.21 + else if (head[0] == 'B' && head[1] == 'Z' && 1.22 @@ -96,7 +99,7 @@ 1.23 #if !ENABLE_FEATURE_2_4_MODULES 1.24 int insmod_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 1.25 int insmod_main(int argc UNUSED_PARAM, char **argv) 1.26 -@@ -4264,8 +4304,7 @@ static int insmod_ng_main(int argc UNUSE 1.27 +@@ -4264,8 +4307,7 @@ static int insmod_ng_main(int argc UNUSE 1.28 xread(fd, map, len); 1.29 } 1.30 #else