aboutsummaryrefslogtreecommitdiffstats
path: root/init/do_mounts_rd.c
diff options
context:
space:
mode:
Diffstat (limited to 'init/do_mounts_rd.c')
-rw-r--r--init/do_mounts_rd.c37
1 files changed, 2 insertions, 35 deletions
diff --git a/init/do_mounts_rd.c b/init/do_mounts_rd.c
index 46dfd64ae8fb..fedef93b586f 100644
--- a/init/do_mounts_rd.c
+++ b/init/do_mounts_rd.c
@@ -10,8 +10,6 @@
10 10
11#include "do_mounts.h" 11#include "do_mounts.h"
12 12
13#define BUILD_CRAMDISK
14
15int __initdata rd_prompt = 1;/* 1 = prompt for RAM disk, 0 = don't prompt */ 13int __initdata rd_prompt = 1;/* 1 = prompt for RAM disk, 0 = don't prompt */
16 14
17static int __init prompt_ramdisk(char *str) 15static int __init prompt_ramdisk(char *str)
@@ -162,14 +160,8 @@ int __init rd_load_image(char *from)
162 goto done; 160 goto done;
163 161
164 if (nblocks == 0) { 162 if (nblocks == 0) {
165#ifdef BUILD_CRAMDISK
166 if (crd_load(in_fd, out_fd) == 0) 163 if (crd_load(in_fd, out_fd) == 0)
167 goto successful_load; 164 goto successful_load;
168#else
169 printk(KERN_NOTICE
170 "RAMDISK: Kernel does not support compressed "
171 "RAM disk images\n");
172#endif
173 goto done; 165 goto done;
174 } 166 }
175 167
@@ -267,8 +259,6 @@ int __init rd_load_disk(int n)
267 return rd_load_image("/dev/root"); 259 return rd_load_image("/dev/root");
268} 260}
269 261
270#ifdef BUILD_CRAMDISK
271
272/* 262/*
273 * gzip declarations 263 * gzip declarations
274 */ 264 */
@@ -313,32 +303,11 @@ static int crd_infd, crd_outfd;
313 303
314static int __init fill_inbuf(void); 304static int __init fill_inbuf(void);
315static void __init flush_window(void); 305static void __init flush_window(void);
316static void __init *malloc(size_t size);
317static void __init free(void *where);
318static void __init error(char *m); 306static void __init error(char *m);
319static void __init gzip_mark(void **);
320static void __init gzip_release(void **);
321
322#include "../lib/inflate.c"
323 307
324static void __init *malloc(size_t size) 308#define NO_INFLATE_MALLOC
325{
326 return kmalloc(size, GFP_KERNEL);
327}
328
329static void __init free(void *where)
330{
331 kfree(where);
332}
333
334static void __init gzip_mark(void **ptr)
335{
336}
337
338static void __init gzip_release(void **ptr)
339{
340}
341 309
310#include "../lib/inflate.c"
342 311
343/* =========================================================================== 312/* ===========================================================================
344 * Fill the input buffer. This is called only when the buffer is empty 313 * Fill the input buffer. This is called only when the buffer is empty
@@ -425,5 +394,3 @@ static int __init crd_load(int in_fd, int out_fd)
425 kfree(window); 394 kfree(window);
426 return result; 395 return result;
427} 396}
428
429#endif /* BUILD_CRAMDISK */