From: James Bottomley <James.Bottomley@steeleye.com>
To: Andrew Morton <akpm@osdl.org>, Linus Torvalds <torvalds@osdl.org>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH] use cramfs as an initrd
Date: 04 Feb 2004 16:34:46 -0500 [thread overview]
Message-ID: <1075930487.2028.123.camel@mulgrave> (raw)
Now that Al Viro fixed cramfs, it works beautifully as an initrd
filesystem, so could we finally plumb it in?
Thanks,
James
===== init/do_mounts_rd.c 1.8 vs edited =====
--- 1.8/init/do_mounts_rd.c Sat Oct 18 10:27:22 2003
+++ edited/init/do_mounts_rd.c Mon Nov 3 15:09:51 2003
@@ -4,6 +4,7 @@
#include <linux/minix_fs.h>
#include <linux/ext2_fs.h>
#include <linux/romfs_fs.h>
+#include <linux/cramfs_fs.h>
#include <linux/initrd.h>
#include <linux/string.h>
@@ -41,6 +42,7 @@
* minix
* ext2
* romfs
+ * cramfs
* gzip
*/
static int __init
@@ -50,6 +52,7 @@
struct minix_super_block *minixsb;
struct ext2_super_block *ext2sb;
struct romfs_super_block *romfsb;
+ struct cramfs_super *cramfsb;
int nblocks = -1;
unsigned char *buf;
@@ -60,6 +63,7 @@
minixsb = (struct minix_super_block *) buf;
ext2sb = (struct ext2_super_block *) buf;
romfsb = (struct romfs_super_block *) buf;
+ cramfsb = (struct cramfs_super *) buf;
memset(buf, 0xe5, size);
/*
@@ -86,6 +90,14 @@
"RAMDISK: romfs filesystem found at block %d\n",
start_block);
nblocks = (ntohl(romfsb->size)+BLOCK_SIZE-1)>>BLOCK_SIZE_BITS;
+ goto done;
+ }
+
+ if (cramfsb->magic == CRAMFS_MAGIC) {
+ printk(KERN_NOTICE
+ "RAMDISK: cramfs filesystem found at block %d\n",
+ start_block);
+ nblocks = (cramfsb->size + BLOCK_SIZE - 1) >> BLOCK_SIZE_BITS;
goto done;
}
reply other threads:[~2004-02-04 21:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1075930487.2028.123.camel@mulgrave \
--to=james.bottomley@steeleye.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.