[oe-commits] Andrea Adami : klibc: update jffs2 and vfat patch. Fix gcc warnings.

git version control git at git.openembedded.org
Thu Feb 24 23:17:32 UTC 2011


Module: openembedded.git
Branch: org.openembedded.dev
Commit: 5dbd8d611f3cb7eb8baddb17211d6077e2060fdb
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=5dbd8d611f3cb7eb8baddb17211d6077e2060fdb

Author: Andrea Adami <andrea.adami at gmail.com>
Date:   Thu Feb 24 19:24:21 2011 +0100

klibc: update jffs2 and vfat patch. Fix gcc warnings.

Signed-off-by: Andrea Adami <andrea.adami at gmail.com>

---

 .../fstype-sane-vfat-and-jffs2-for-1.5.patch       |   72 +++++++++++---------
 1 files changed, 39 insertions(+), 33 deletions(-)

diff --git a/recipes/klibc/klibc-1.5.21/fstype-sane-vfat-and-jffs2-for-1.5.patch b/recipes/klibc/klibc-1.5.21/fstype-sane-vfat-and-jffs2-for-1.5.patch
index 041f679..4448fe2 100644
--- a/recipes/klibc/klibc-1.5.21/fstype-sane-vfat-and-jffs2-for-1.5.patch
+++ b/recipes/klibc/klibc-1.5.21/fstype-sane-vfat-and-jffs2-for-1.5.patch
@@ -1,7 +1,7 @@
-Index: klibc-1.5/usr/kinit/fstype/fstype.c
+Index: klibc-1.5.21/usr/kinit/fstype/fstype.c
 ===================================================================
---- klibc-1.5.orig/usr/kinit/fstype/fstype.c	2008-02-28 00:48:35.319254938 +0100
-+++ klibc-1.5/usr/kinit/fstype/fstype.c	2008-02-28 00:52:20.583257793 +0100
+--- a/usr/kinit/fstype/fstype.c
++++ b/usr/kinit/fstype/fstype.c
 @@ -20,7 +20,7 @@
  #include <netinet/in.h>
  #include <sys/utsname.h>
@@ -9,12 +9,12 @@ Index: klibc-1.5/usr/kinit/fstype/fstype.c
 -
 +#include <linux/types.h>
  #define cpu_to_be32(x) __cpu_to_be32(x)	/* Needed by romfs_fs.h */
-
- #include "romfs_fs.h"
-@@ -37,6 +37,12 @@
- #include "ocfs2_fs.h"
- #include "nilfs_fs.h"
-
+ 
+ #include "btrfs.h"
+@@ -38,6 +38,12 @@
+ #include "squashfs_fs.h"
+ #include "xfs_sb.h"
+ 
 +#if __BYTE_ORDER == __BIG_ENDIAN
 +#include <linux/byteorder/big_endian.h>
 +#else
@@ -24,40 +24,46 @@ Index: klibc-1.5/usr/kinit/fstype/fstype.c
  /*
   * Slightly cleaned up version of jfs_superblock to
   * avoid pulling in other kernel header files.
-@@ -59,6 +65,27 @@
+@@ -60,6 +66,30 @@
  /* Swap needs the definition of block size */
  #include "swap_fs.h"
-
-+static int jffs2_image(const unsigned char *buf, unsigned long *blocks)
+ 
++static int jffs2_image(const void *buf, unsigned long long *blocks)
 +{
-+       // Very sloppy! ;-E
-+       if (*buf == 0x85 && buf[1] == 0x19)
-+               return 1;
++	const unsigned char *p = buf;
 +
-+       return 0;
++	if (p[0] == 0x85 && p[1] == 0x19) {
++		*blocks=0;
++		return 1;
++	}
++	return 0;
 +}
 +
-+static int vfat_image(const unsigned char *buf, unsigned long *blocks)
++static int vfat_image(const void *buf, unsigned long long *blocks)
 +{
-+        const struct romfs_super_block *sb =
-+               (const struct romfs_super_block *)buf;
-+       if (!strncmp(buf + 54, "FAT12   ", 8)
-+           || !strncmp(buf + 54, "FAT16   ", 8)
-+           || !strncmp(buf + 82, "FAT32   ", 8))
-+               return 1;
++	const char *p = buf;
 +
-+       return 0;
++	if (!strncmp(p + 54, "FAT12   ", 8)
++	 || !strncmp(p + 54, "FAT16   ", 8)
++	 || !strncmp(p + 82, "FAT32   ", 8)) {
++		*blocks=0;
++		return 1;
++	}
++	return 0;
 +}
 +
  static int gzip_image(const void *buf, unsigned long long *bytes)
- {277 304
-	const unsigned char *p = buf;
-@@ -490,6 +517,8 @@
-	{1, "ext3", ext3_image},
-	{1, "ext2", ext2_image},
-	{1, "minix", minix_image},
+ {
+ 	const unsigned char *p = buf;
+@@ -495,6 +525,8 @@ static struct imagetype images[] = {
+ 	{1, "ext3", ext3_image},
+ 	{1, "ext2", ext2_image},
+ 	{1, "minix", minix_image},
 +	{0, "jffs2", jffs2_image},
 +	{0, "vfat", vfat_image},
-	{1, "nilfs2", nilfs2_image},
-	{2, "ocfs2", ocfs2_image},
-	{8, "reiserfs", reiserfs_image},
+ 	{1, "nilfs2", nilfs2_image},
+ 	{2, "ocfs2", ocfs2_image},
+ 	{8, "reiserfs", reiserfs_image},
+-- 
+1.7.3.4
+





More information about the Openembedded-commits mailing list