wok-current rev 314

Linux: misc fixes
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Mar 03 21:52:08 2008 +0000 (2008-03-03)
parents 28bd53ce3a11
children d2b66b4cb163
files linux/stuff/config-acpi-2.6.22.9.u linux/stuff/config-acpi-2.6.24.2.u linux/stuff/config-ieee1394-2.6.24.2.u linux/stuff/linux-lzma-export.u
line diff
     1.1 --- a/linux/stuff/config-acpi-2.6.22.9.u	Sun Mar 02 23:16:29 2008 +0000
     1.2 +++ b/linux/stuff/config-acpi-2.6.22.9.u	Mon Mar 03 21:52:08 2008 +0000
     1.3 @@ -1,5 +1,5 @@
     1.4 ---- .config	Wed Feb 20 23:40:09 2008
     1.5 -+++ .config	Wed Feb 20 23:45:30 2008
     1.6 +--- linux-2.6.22.9/.config	Wed Feb 20 23:40:09 2008
     1.7 ++++ linux-2.6.22.9/.config	Wed Feb 20 23:45:30 2008
     1.8  @@ -1,7 +1,7 @@
     1.9   #
    1.10   # Automatically generated make config: don't edit
     2.1 --- a/linux/stuff/config-acpi-2.6.24.2.u	Sun Mar 02 23:16:29 2008 +0000
     2.2 +++ b/linux/stuff/config-acpi-2.6.24.2.u	Mon Mar 03 21:52:08 2008 +0000
     2.3 @@ -1,5 +1,5 @@
     2.4 ---- .config	Fri Feb 15 21:12:02 2008
     2.5 -+++ .config	Fri Feb 15 21:11:24 2008
     2.6 +--- linux-2.6.24.2/.config	Fri Feb 15 21:12:02 2008
     2.7 ++++ linux-2.6.24.2/.config	Fri Feb 15 21:11:24 2008
     2.8  @@ -1,7 +1,7 @@
     2.9   #
    2.10   # Automatically generated make config: don't edit
     3.1 --- a/linux/stuff/config-ieee1394-2.6.24.2.u	Sun Mar 02 23:16:29 2008 +0000
     3.2 +++ b/linux/stuff/config-ieee1394-2.6.24.2.u	Mon Mar 03 21:52:08 2008 +0000
     3.3 @@ -1,5 +1,5 @@
     3.4 ---- .config	Fri Feb 29 23:03:54 2008
     3.5 -+++ .config	Fri Feb 29 22:59:38 2008
     3.6 +--- linux-2.6.24.2/.config	Fri Feb 29 23:03:54 2008
     3.7 ++++ linux-2.6.24.2/.config	Fri Feb 29 22:59:38 2008
     3.8  @@ -1,7 +1,7 @@
     3.9   #
    3.10   # Automatically generated make config: don't edit
     4.1 --- a/linux/stuff/linux-lzma-export.u	Sun Mar 02 23:16:29 2008 +0000
     4.2 +++ b/linux/stuff/linux-lzma-export.u	Mon Mar 03 21:52:08 2008 +0000
     4.3 @@ -1,6 +1,6 @@
     4.4  --- linux-2.6.24.2/lib/decompress_unlzma.c
     4.5  +++ linux-2.6.24.2/lib/decompress_unlzma.c
     4.6 -@@ -52,11 +52,6 @@ static void __init large_free(void *wher
     4.7 +@@ -52,16 +52,6 @@
     4.8   }
     4.9   
    4.10   #ifndef TEST
    4.11 @@ -9,19 +9,29 @@
    4.12  -	return kmalloc(size, GFP_KERNEL);
    4.13  -}
    4.14  -
    4.15 - static void __init free(void *where)
    4.16 +-static void __init free(void *where)
    4.17 +-{
    4.18 +-	kfree(where);
    4.19 +-}
    4.20 +-
    4.21 + static void __init error(char *x)
    4.22   {
    4.23 - 	kfree(where);
    4.24 -@@ -321,7 +316,7 @@ typedef struct {
    4.25 - #define LZMA_LITERAL (LZMA_REP_LEN_CODER + LZMA_NUM_LEN_PROBS)
    4.26 + 	printk(KERN_ERR "%s\n", x);
    4.27 +@@ -166,13 +156,6 @@
    4.28 + 	}
    4.29 + }
    4.30   
    4.31 - 
    4.32 --STATIC int unlzma(char *inbuf, int in_len, 
    4.33 -+int unlzma(char *inbuf, int in_len, 
    4.34 - 		   int(*fill)(void*,unsigned int),
    4.35 - 		   int(*writebb)(char*,unsigned int),
    4.36 - 		   int *posp)
    4.37 -@@ -348,10 +343,21 @@ STATIC int unlzma(char *inbuf, int in_le
    4.38 +-
    4.39 +-/* Called once. TODO: bb_maybe_free() */
    4.40 +-static always_inline void rc_free(rc_t * rc)
    4.41 +-{
    4.42 +-	free(rc->buffer);
    4.43 +-}
    4.44 +-
    4.45 + /* Called twice, but one callsite is in speed_inline'd rc_is_bit_0_helper() */
    4.46 + static void rc_do_normalize(rc_t * rc)
    4.47 + {
    4.48 +@@ -348,10 +331,22 @@
    4.49   
    4.50   	rc_init(&rc, fill, inbuf, in_len);
    4.51   
    4.52 @@ -30,14 +40,15 @@
    4.53  -			rc_read(&rc);
    4.54  -		((unsigned char *)&header)[i] = *rc.ptr++;
    4.55  +	header.dict_size = header.dst_size = in_len;
    4.56 -+	if (inbuf && inbuf[0] == 0) {
    4.57 ++	if (inbuf && in_len > 0 && inbuf[0] == 0) {
    4.58  +		const int LZMA_LC = 3, LZMA_LP = 0, LZMA_PB = 2;
    4.59  +		header.pos = (LZMA_PB * 45) + (LZMA_LP * 5) + LZMA_LC;
    4.60  +		rc.ptr++;
    4.61  +	}
    4.62  +	else {
    4.63  +		int hdrsize = sizeof(header);
    4.64 -+		if (inbuf && (1 + * (unsigned long *) &inbuf[9]) > 1U)
    4.65 ++		if (inbuf && in_len > 12 &&
    4.66 ++		    (1 + * (unsigned long *) &inbuf[9]) > 1U)
    4.67  +			hdrsize = 5;
    4.68  +		for (i = 0; i < hdrsize; i++) {
    4.69  +			if (rc.ptr >= rc.buffer_end)