Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
b8fed87d
Commit
b8fed87d
authored
Jan 05, 2009
by
Phillip Lougher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Squashfs: initrd support
Signed-off-by:
Phillip Lougher
<
phillip@lougher.demon.co.uk
>
parent
6ab5c1ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
init/do_mounts_rd.c
init/do_mounts_rd.c
+14
-0
No files found.
init/do_mounts_rd.c
View file @
b8fed87d
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
#include <linux/string.h>
#include <linux/string.h>
#include "do_mounts.h"
#include "do_mounts.h"
#include "../fs/squashfs/squashfs_fs.h"
int
__initdata
rd_prompt
=
1
;
/* 1 = prompt for RAM disk, 0 = don't prompt */
int
__initdata
rd_prompt
=
1
;
/* 1 = prompt for RAM disk, 0 = don't prompt */
...
@@ -41,6 +42,7 @@ static int __init crd_load(int in_fd, int out_fd);
...
@@ -41,6 +42,7 @@ static int __init crd_load(int in_fd, int out_fd);
* ext2
* ext2
* romfs
* romfs
* cramfs
* cramfs
* squashfs
* gzip
* gzip
*/
*/
static
int
__init
static
int
__init
...
@@ -51,6 +53,7 @@ identify_ramdisk_image(int fd, int start_block)
...
@@ -51,6 +53,7 @@ identify_ramdisk_image(int fd, int start_block)
struct
ext2_super_block
*
ext2sb
;
struct
ext2_super_block
*
ext2sb
;
struct
romfs_super_block
*
romfsb
;
struct
romfs_super_block
*
romfsb
;
struct
cramfs_super
*
cramfsb
;
struct
cramfs_super
*
cramfsb
;
struct
squashfs_super_block
*
squashfsb
;
int
nblocks
=
-
1
;
int
nblocks
=
-
1
;
unsigned
char
*
buf
;
unsigned
char
*
buf
;
...
@@ -62,6 +65,7 @@ identify_ramdisk_image(int fd, int start_block)
...
@@ -62,6 +65,7 @@ identify_ramdisk_image(int fd, int start_block)
ext2sb
=
(
struct
ext2_super_block
*
)
buf
;
ext2sb
=
(
struct
ext2_super_block
*
)
buf
;
romfsb
=
(
struct
romfs_super_block
*
)
buf
;
romfsb
=
(
struct
romfs_super_block
*
)
buf
;
cramfsb
=
(
struct
cramfs_super
*
)
buf
;
cramfsb
=
(
struct
cramfs_super
*
)
buf
;
squashfsb
=
(
struct
squashfs_super_block
*
)
buf
;
memset
(
buf
,
0xe5
,
size
);
memset
(
buf
,
0xe5
,
size
);
/*
/*
...
@@ -99,6 +103,16 @@ identify_ramdisk_image(int fd, int start_block)
...
@@ -99,6 +103,16 @@ identify_ramdisk_image(int fd, int start_block)
goto
done
;
goto
done
;
}
}
/* squashfs is at block zero too */
if
(
le32_to_cpu
(
squashfsb
->
s_magic
)
==
SQUASHFS_MAGIC
)
{
printk
(
KERN_NOTICE
"RAMDISK: squashfs filesystem found at block %d
\n
"
,
start_block
);
nblocks
=
(
le64_to_cpu
(
squashfsb
->
bytes_used
)
+
BLOCK_SIZE
-
1
)
>>
BLOCK_SIZE_BITS
;
goto
done
;
}
/*
/*
* Read block 1 to test for minix and ext2 superblock
* Read block 1 to test for minix and ext2 superblock
*/
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment