Lines 20-26
Link Here
|
20 |
#include <netinet/in.h> |
20 |
#include <netinet/in.h> |
21 |
#include <sys/utsname.h> |
21 |
#include <sys/utsname.h> |
22 |
#include <sys/vfs.h> |
22 |
#include <sys/vfs.h> |
23 |
|
23 |
#include <linux/types.h> |
24 |
#define cpu_to_be32(x) __cpu_to_be32(x) /* Needed by romfs_fs.h */ |
24 |
#define cpu_to_be32(x) __cpu_to_be32(x) /* Needed by romfs_fs.h */ |
25 |
|
25 |
|
26 |
#include "romfs_fs.h" |
26 |
#include "romfs_fs.h" |
Lines 37-42
Link Here
|
37 |
#include "ocfs2_fs.h" |
37 |
#include "ocfs2_fs.h" |
38 |
#include "nilfs_fs.h" |
38 |
#include "nilfs_fs.h" |
39 |
|
39 |
|
|
|
40 |
#if __BYTE_ORDER == __BIG_ENDIAN |
41 |
#include <linux/byteorder/big_endian.h> |
42 |
#else |
43 |
#include <linux/byteorder/little_endian.h> |
44 |
#endif |
45 |
|
40 |
/* |
46 |
/* |
41 |
* Slightly cleaned up version of jfs_superblock to |
47 |
* Slightly cleaned up version of jfs_superblock to |
42 |
* avoid pulling in other kernel header files. |
48 |
* avoid pulling in other kernel header files. |
Lines 59-64
Link Here
|
59 |
/* Swap needs the definition of block size */ |
65 |
/* Swap needs the definition of block size */ |
60 |
#include "swap_fs.h" |
66 |
#include "swap_fs.h" |
61 |
|
67 |
|
|
|
68 |
static int jffs2_image(const unsigned char *buf, unsigned long *blocks) |
69 |
{ |
70 |
// Very sloppy! ;-E |
71 |
if (*buf == 0x85 && buf[1] == 0x19) |
72 |
return 1; |
73 |
|
74 |
return 0; |
75 |
} |
76 |
|
77 |
static int vfat_image(const unsigned char *buf, unsigned long *blocks) |
78 |
{ |
79 |
const struct romfs_super_block *sb = |
80 |
(const struct romfs_super_block *)buf; |
81 |
if (!strncmp(buf + 54, "FAT12 ", 8) |
82 |
|| !strncmp(buf + 54, "FAT16 ", 8) |
83 |
|| !strncmp(buf + 82, "FAT32 ", 8)) |
84 |
return 1; |
85 |
|
86 |
return 0; |
87 |
} |
88 |
|
62 |
static int gzip_image(const void *buf, unsigned long long *bytes) |
89 |
static int gzip_image(const void *buf, unsigned long long *bytes) |
63 |
{277 304 |
90 |
{277 304 |
64 |
const unsigned char *p = buf; |
91 |
const unsigned char *p = buf; |
Lines 490-495
Link Here
|
490 |
{1, "ext3", ext3_image}, |
517 |
{1, "ext3", ext3_image}, |
491 |
{1, "ext2", ext2_image}, |
518 |
{1, "ext2", ext2_image}, |
492 |
{1, "minix", minix_image}, |
519 |
{1, "minix", minix_image}, |
|
|
520 |
{0, "jffs2", jffs2_image}, |
521 |
{0, "vfat", vfat_image}, |
493 |
{8, "reiserfs", reiserfs_image}, |
522 |
{8, "reiserfs", reiserfs_image}, |