summaryrefslogtreecommitdiff
path: root/packages/klibc
diff options
context:
space:
mode:
authorPaul Sokolovsky <pmiscml@gmail.com>2008-02-14 00:19:14 +0000
committerPaul Sokolovsky <pmiscml@gmail.com>2008-02-14 00:19:14 +0000
commitbb41487f9277dddccf84d49256e31931c5bea28a (patch)
tree45023560fa41b591212dabaa075aa02484dc78b1 /packages/klibc
parent58f72842999b89acf8dd80bee782da54b5ee16e3 (diff)
klibc-utils-fstype 1.1.1: Add rudimentary jffs2 detection.
Diffstat (limited to 'packages/klibc')
-rw-r--r--packages/klibc/files/fstype-sane-and-vfat-jffs2.patch (renamed from packages/klibc/files/fstype-sane-and-vfat.patch)24
-rw-r--r--packages/klibc/klibc-utils-fstype_1.1.1.bb4
2 files changed, 18 insertions, 10 deletions
diff --git a/packages/klibc/files/fstype-sane-and-vfat.patch b/packages/klibc/files/fstype-sane-and-vfat-jffs2.patch
index 7b7674637a..e89c5adb9a 100644
--- a/packages/klibc/files/fstype-sane-and-vfat.patch
+++ b/packages/klibc/files/fstype-sane-and-vfat-jffs2.patch
@@ -1,8 +1,6 @@
-Patch to compile fstype util against "normal" libc (glibc/uclicb), and to
-add vfat detection.
-
---- klibc-1.1.1/utils/fstype.c.org 2005-09-06 23:49:34.000000000 +0300
-+++ klibc-1.1.1/utils/fstype.c 2007-11-24 01:07:26.000000000 +0200
+diff -r 3c9d84425ba7 utils/fstype.c
+--- a/utils/fstype.c Thu Feb 14 02:09:30 2008 +0200
++++ b/utils/fstype.c Thu Feb 14 02:13:46 2008 +0200
@@ -13,11 +13,18 @@
*/
@@ -22,10 +20,19 @@ add vfat detection.
#define cpu_to_be32(x) __cpu_to_be32(x) /* Needed by romfs_fs.h */
-@@ -105,6 +112,18 @@
+@@ -105,6 +112,27 @@ static int romfs_image(const unsigned ch
return 0;
}
++static int jffs2_image(const unsigned char *buf, unsigned long *blocks)
++{
++ // Very sloppy! ;-E
++ if (*buf == 0x85 && buf[1] == 0x19)
++ return 1;
++
++ return 0;
++}
++
+static int vfat_image(const unsigned char *buf, unsigned long *blocks)
+{
+ const struct romfs_super_block *sb =
@@ -41,7 +48,7 @@ add vfat detection.
static int minix_image(const unsigned char *buf, unsigned long *blocks)
{
const struct minix_super_block *sb =
-@@ -167,8 +186,6 @@
+@@ -167,8 +195,6 @@ static int xfs_image(const unsigned char
(const struct xfs_sb *)buf;
if (__be32_to_cpu(sb->sb_magicnum) == XFS_SB_MAGIC) {
@@ -50,10 +57,11 @@ add vfat detection.
return 1;
}
return 0;
-@@ -184,6 +201,7 @@
+@@ -184,6 +210,8 @@ static struct imagetype images[] = {
{ 0, "gzip", gzip_image },
{ 0, "cramfs", cramfs_image },
{ 0, "romfs", romfs_image },
++ { 0, "jffs2", jffs2_image },
+ { 0, "vfat", vfat_image },
{ 0, "xfs", xfs_image },
{ 1, "minix", minix_image },
diff --git a/packages/klibc/klibc-utils-fstype_1.1.1.bb b/packages/klibc/klibc-utils-fstype_1.1.1.bb
index 29ce38285c..2bcc0f6085 100644
--- a/packages/klibc/klibc-utils-fstype_1.1.1.bb
+++ b/packages/klibc/klibc-utils-fstype_1.1.1.bb
@@ -1,6 +1,6 @@
SRC_URI = "${KERNELORG_MIRROR}/pub/linux/libs/klibc/Stable/klibc-${PV}.tar.bz2"
-SRC_URI += "file://fstype-sane-and-vfat.patch;patch=1"
-PR = "r0"
+SRC_URI += "file://fstype-sane-and-vfat-jffs2.patch;patch=1"
+PR = "r1"
S = "${WORKDIR}/klibc-${PV}"