git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge commit 'upstream/master'
[pandora-kernel.git]
/
init
/
do_mounts_rd.c
diff --git
a/init/do_mounts_rd.c
b/init/do_mounts_rd.c
index
ed652f4
..
fedef93
100644
(file)
--- a/
init/do_mounts_rd.c
+++ b/
init/do_mounts_rd.c
@@
-10,8
+10,6
@@
#include "do_mounts.h"
#include "do_mounts.h"
-#define BUILD_CRAMDISK
-
int __initdata rd_prompt = 1;/* 1 = prompt for RAM disk, 0 = don't prompt */
static int __init prompt_ramdisk(char *str)
int __initdata rd_prompt = 1;/* 1 = prompt for RAM disk, 0 = don't prompt */
static int __init prompt_ramdisk(char *str)
@@
-57,7
+55,7
@@
identify_ramdisk_image(int fd, int start_block)
unsigned char *buf;
buf = kmalloc(size, GFP_KERNEL);
unsigned char *buf;
buf = kmalloc(size, GFP_KERNEL);
- if (
buf == 0
)
+ if (
!buf
)
return -1;
minixsb = (struct minix_super_block *) buf;
return -1;
minixsb = (struct minix_super_block *) buf;
@@
-162,14
+160,8
@@
int __init rd_load_image(char *from)
goto done;
if (nblocks == 0) {
goto done;
if (nblocks == 0) {
-#ifdef BUILD_CRAMDISK
if (crd_load(in_fd, out_fd) == 0)
goto successful_load;
if (crd_load(in_fd, out_fd) == 0)
goto successful_load;
-#else
- printk(KERN_NOTICE
- "RAMDISK: Kernel does not support compressed "
- "RAM disk images\n");
-#endif
goto done;
}
goto done;
}
@@
-212,7
+204,7
@@
int __init rd_load_image(char *from)
}
buf = kmalloc(BLOCK_SIZE, GFP_KERNEL);
}
buf = kmalloc(BLOCK_SIZE, GFP_KERNEL);
- if (
buf == 0
) {
+ if (
!buf
) {
printk(KERN_ERR "RAMDISK: could not allocate buffer\n");
goto done;
}
printk(KERN_ERR "RAMDISK: could not allocate buffer\n");
goto done;
}
@@
-267,8
+259,6
@@
int __init rd_load_disk(int n)
return rd_load_image("/dev/root");
}
return rd_load_image("/dev/root");
}
-#ifdef BUILD_CRAMDISK
-
/*
* gzip declarations
*/
/*
* gzip declarations
*/
@@
-313,32
+303,11
@@
static int crd_infd, crd_outfd;
static int __init fill_inbuf(void);
static void __init flush_window(void);
static int __init fill_inbuf(void);
static void __init flush_window(void);
-static void __init *malloc(size_t size);
-static void __init free(void *where);
static void __init error(char *m);
static void __init error(char *m);
-static void __init gzip_mark(void **);
-static void __init gzip_release(void **);
-
-#include "../lib/inflate.c"
-static void __init *malloc(size_t size)
-{
- return kmalloc(size, GFP_KERNEL);
-}
-
-static void __init free(void *where)
-{
- kfree(where);
-}
-
-static void __init gzip_mark(void **ptr)
-{
-}
-
-static void __init gzip_release(void **ptr)
-{
-}
+#define NO_INFLATE_MALLOC
+#include "../lib/inflate.c"
/* ===========================================================================
* Fill the input buffer. This is called only when the buffer is empty
/* ===========================================================================
* Fill the input buffer. This is called only when the buffer is empty
@@
-407,12
+376,12
@@
static int __init crd_load(int in_fd, int out_fd)
crd_infd = in_fd;
crd_outfd = out_fd;
inbuf = kmalloc(INBUFSIZ, GFP_KERNEL);
crd_infd = in_fd;
crd_outfd = out_fd;
inbuf = kmalloc(INBUFSIZ, GFP_KERNEL);
- if (
inbuf == 0
) {
+ if (
!inbuf
) {
printk(KERN_ERR "RAMDISK: Couldn't allocate gzip buffer\n");
return -1;
}
window = kmalloc(WSIZE, GFP_KERNEL);
printk(KERN_ERR "RAMDISK: Couldn't allocate gzip buffer\n");
return -1;
}
window = kmalloc(WSIZE, GFP_KERNEL);
- if (
window == 0
) {
+ if (
!window
) {
printk(KERN_ERR "RAMDISK: Couldn't allocate gzip window\n");
kfree(inbuf);
return -1;
printk(KERN_ERR "RAMDISK: Couldn't allocate gzip window\n");
kfree(inbuf);
return -1;
@@
-425,5
+394,3
@@
static int __init crd_load(int in_fd, int out_fd)
kfree(window);
return result;
}
kfree(window);
return result;
}
-
-#endif /* BUILD_CRAMDISK */