All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Korsgaard <jacmet@sunsite.dk>
To: buildroot@busybox.net
Subject: [Buildroot] [git commit master 1/1] mtd: bump version
Date: Sat, 16 Oct 2010 22:20:21 +0200	[thread overview]
Message-ID: <20101016202051.EC7508C006@busybox.osuosl.org> (raw)


commit: http://git.buildroot.net/buildroot/commit/?id=90660c282298fdb6b09baefe44845b923d9e077f
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

For mkfs.jffs2 bugfix.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 .../mtd-1.4.0-clean-up-zlib.h-usage-a-bit.patch    |  240 --------------------
 package/mtd/mtd.mk                                 |    2 +-
 2 files changed, 1 insertions(+), 241 deletions(-)
 delete mode 100644 package/mtd/mtd-1.4.0-clean-up-zlib.h-usage-a-bit.patch

diff --git a/package/mtd/mtd-1.4.0-clean-up-zlib.h-usage-a-bit.patch b/package/mtd/mtd-1.4.0-clean-up-zlib.h-usage-a-bit.patch
deleted file mode 100644
index 5b6518b..0000000
--- a/package/mtd/mtd-1.4.0-clean-up-zlib.h-usage-a-bit.patch
+++ /dev/null
@@ -1,240 +0,0 @@
-From b864c387e8f16273aad1453d6457d847e29c3d25 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Wed, 22 Sep 2010 22:32:56 -0400
-Subject: [PATCH] mtd-utils: clean up zlib.h usage a bit
-
-Hide zlib's crc32 in compr_zlib.c and mkfs.ubifs/compr.c.
-
-jffs2reader.c and mkfs.jffs2.c don't actually use zlib, so punt the
-include from the file.
-
-mkfs.jffs2.c is implicitly using crc32 from zlib.h instead of the
-local mtd_crc32, so fix the local usage.  otherwise we get warnings
-about undefined crc32 because the file was redirecting the prototype.
-
-Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
----
- compr_zlib.c       |    2 ++
- jffs2reader.c      |    1 -
- mkfs.jffs2.c       |   49 +++++++++++++++++++++++--------------------------
- mkfs.ubifs/compr.c |    1 +
- 4 files changed, 26 insertions(+), 27 deletions(-)
-
-diff --git a/compr_zlib.c b/compr_zlib.c
-index 400b18a..db4811d 100644
---- a/compr_zlib.c
-+++ b/compr_zlib.c
-@@ -33,7 +33,9 @@
-  */
- 
- #include <stdint.h>
-+#define crc32 __zlib_crc32
- #include <zlib.h>
-+#undef crc32
- #include <stdio.h>
- #include <asm/types.h>
- #include <linux/jffs2.h>
-diff --git a/jffs2reader.c b/jffs2reader.c
-index cde1d06..0ad7207 100644
---- a/jffs2reader.c
-+++ b/jffs2reader.c
-@@ -75,7 +75,6 @@ BUGS:
- #include <sys/stat.h>
- #include <sys/param.h>
- #include <dirent.h>
--#include <zlib.h>
- #include <linux/jffs2.h>
- 
- #define SCRATCH_SIZE (5*1024*1024)
-diff --git a/mkfs.jffs2.c b/mkfs.jffs2.c
-index ebfdb50..5c18eb1 100644
---- a/mkfs.jffs2.c
-+++ b/mkfs.jffs2.c
-@@ -69,9 +69,6 @@
- #include <sys/acl.h>
- #endif
- #include <byteswap.h>
--#define crc32 __zlib_crc32
--#include <zlib.h>
--#undef crc32
- #include <crc32.h>
- #include "rbtree.h"
- 
-@@ -798,7 +795,7 @@ static void write_dirent(struct filesystem_entry *e)
- 	rd.magic = cpu_to_je16(JFFS2_MAGIC_BITMASK);
- 	rd.nodetype = cpu_to_je16(JFFS2_NODETYPE_DIRENT);
- 	rd.totlen = cpu_to_je32(sizeof(rd) + strlen(name));
--	rd.hdr_crc = cpu_to_je32(crc32(0, &rd,
-+	rd.hdr_crc = cpu_to_je32(mtd_crc32(0, &rd,
- 				sizeof(struct jffs2_unknown_node) - 4));
- 	rd.pino = cpu_to_je32((e->parent) ? e->parent->ino : 1);
- 	rd.version = cpu_to_je32(version++);
-@@ -808,8 +805,8 @@ static void write_dirent(struct filesystem_entry *e)
- 	rd.type = IFTODT(statbuf->st_mode);
- 	//rd.unused[0] = 0;
- 	//rd.unused[1] = 0;
--	rd.node_crc = cpu_to_je32(crc32(0, &rd, sizeof(rd) - 8));
--	rd.name_crc = cpu_to_je32(crc32(0, name, strlen(name)));
-+	rd.node_crc = cpu_to_je32(mtd_crc32(0, &rd, sizeof(rd) - 8));
-+	rd.name_crc = cpu_to_je32(mtd_crc32(0, name, strlen(name)));
- 
- 	pad_block_if_less_than(sizeof(rd) + rd.nsize);
- 	full_write(out_fd, &rd, sizeof(rd));
-@@ -895,15 +892,15 @@ static unsigned int write_regular_file(struct filesystem_entry *e)
- 			}
- 
- 			ri.totlen = cpu_to_je32(sizeof(ri) + space);
--			ri.hdr_crc = cpu_to_je32(crc32(0,
-+			ri.hdr_crc = cpu_to_je32(mtd_crc32(0,
- 						&ri, sizeof(struct jffs2_unknown_node) - 4));
- 
- 			ri.version = cpu_to_je32(++ver);
- 			ri.offset = cpu_to_je32(offset);
- 			ri.csize = cpu_to_je32(space);
- 			ri.dsize = cpu_to_je32(dsize);
--			ri.node_crc = cpu_to_je32(crc32(0, &ri, sizeof(ri) - 8));
--			ri.data_crc = cpu_to_je32(crc32(0, wbuf, space));
-+			ri.node_crc = cpu_to_je32(mtd_crc32(0, &ri, sizeof(ri) - 8));
-+			ri.data_crc = cpu_to_je32(mtd_crc32(0, wbuf, space));
- 
- 			full_write(out_fd, &ri, sizeof(ri));
- 			totcomp += sizeof(ri);
-@@ -928,11 +925,11 @@ static unsigned int write_regular_file(struct filesystem_entry *e)
- 
- 		ri.version = cpu_to_je32(++ver);
- 		ri.totlen = cpu_to_je32(sizeof(ri));
--		ri.hdr_crc = cpu_to_je32(crc32(0,
-+		ri.hdr_crc = cpu_to_je32(mtd_crc32(0,
- 					&ri, sizeof(struct jffs2_unknown_node) - 4));
- 		ri.csize = cpu_to_je32(0);
- 		ri.dsize = cpu_to_je32(0);
--		ri.node_crc = cpu_to_je32(crc32(0, &ri, sizeof(ri) - 8));
-+		ri.node_crc = cpu_to_je32(mtd_crc32(0, &ri, sizeof(ri) - 8));
- 
- 		full_write(out_fd, &ri, sizeof(ri));
- 		padword();
-@@ -967,7 +964,7 @@ static void write_symlink(struct filesystem_entry *e)
- 	ri.magic = cpu_to_je16(JFFS2_MAGIC_BITMASK);
- 	ri.nodetype = cpu_to_je16(JFFS2_NODETYPE_INODE);
- 	ri.totlen = cpu_to_je32(sizeof(ri) + len);
--	ri.hdr_crc = cpu_to_je32(crc32(0,
-+	ri.hdr_crc = cpu_to_je32(mtd_crc32(0,
- 				&ri, sizeof(struct jffs2_unknown_node) - 4));
- 
- 	ri.ino = cpu_to_je32(e->ino);
-@@ -981,8 +978,8 @@ static void write_symlink(struct filesystem_entry *e)
- 	ri.version = cpu_to_je32(1);
- 	ri.csize = cpu_to_je32(len);
- 	ri.dsize = cpu_to_je32(len);
--	ri.node_crc = cpu_to_je32(crc32(0, &ri, sizeof(ri) - 8));
--	ri.data_crc = cpu_to_je32(crc32(0, e->link, len));
-+	ri.node_crc = cpu_to_je32(mtd_crc32(0, &ri, sizeof(ri) - 8));
-+	ri.data_crc = cpu_to_je32(mtd_crc32(0, e->link, len));
- 
- 	pad_block_if_less_than(sizeof(ri) + len);
- 	full_write(out_fd, &ri, sizeof(ri));
-@@ -1009,7 +1006,7 @@ static void write_pipe(struct filesystem_entry *e)
- 	ri.magic = cpu_to_je16(JFFS2_MAGIC_BITMASK);
- 	ri.nodetype = cpu_to_je16(JFFS2_NODETYPE_INODE);
- 	ri.totlen = cpu_to_je32(sizeof(ri));
--	ri.hdr_crc = cpu_to_je32(crc32(0,
-+	ri.hdr_crc = cpu_to_je32(mtd_crc32(0,
- 				&ri, sizeof(struct jffs2_unknown_node) - 4));
- 
- 	ri.ino = cpu_to_je32(e->ino);
-@@ -1023,7 +1020,7 @@ static void write_pipe(struct filesystem_entry *e)
- 	ri.version = cpu_to_je32(1);
- 	ri.csize = cpu_to_je32(0);
- 	ri.dsize = cpu_to_je32(0);
--	ri.node_crc = cpu_to_je32(crc32(0, &ri, sizeof(ri) - 8));
-+	ri.node_crc = cpu_to_je32(mtd_crc32(0, &ri, sizeof(ri) - 8));
- 	ri.data_crc = cpu_to_je32(0);
- 
- 	pad_block_if_less_than(sizeof(ri));
-@@ -1049,7 +1046,7 @@ static void write_special_file(struct filesystem_entry *e)
- 	ri.magic = cpu_to_je16(JFFS2_MAGIC_BITMASK);
- 	ri.nodetype = cpu_to_je16(JFFS2_NODETYPE_INODE);
- 	ri.totlen = cpu_to_je32(sizeof(ri) + sizeof(kdev));
--	ri.hdr_crc = cpu_to_je32(crc32(0,
-+	ri.hdr_crc = cpu_to_je32(mtd_crc32(0,
- 				&ri, sizeof(struct jffs2_unknown_node) - 4));
- 
- 	ri.ino = cpu_to_je32(e->ino);
-@@ -1063,8 +1060,8 @@ static void write_special_file(struct filesystem_entry *e)
- 	ri.version = cpu_to_je32(1);
- 	ri.csize = cpu_to_je32(sizeof(kdev));
- 	ri.dsize = cpu_to_je32(sizeof(kdev));
--	ri.node_crc = cpu_to_je32(crc32(0, &ri, sizeof(ri) - 8));
--	ri.data_crc = cpu_to_je32(crc32(0, &kdev, sizeof(kdev)));
-+	ri.node_crc = cpu_to_je32(mtd_crc32(0, &ri, sizeof(ri) - 8));
-+	ri.data_crc = cpu_to_je32(mtd_crc32(0, &kdev, sizeof(kdev)));
- 
- 	pad_block_if_less_than(sizeof(ri) + sizeof(kdev));
- 	full_write(out_fd, &ri, sizeof(ri));
-@@ -1177,15 +1174,15 @@ static xattr_entry_t *create_xattr_entry(int xprefix, char *xname, char *xvalue,
- 	rx.magic = cpu_to_je16(JFFS2_MAGIC_BITMASK);
- 	rx.nodetype = cpu_to_je16(JFFS2_NODETYPE_XATTR);
- 	rx.totlen = cpu_to_je32(PAD(sizeof(rx) + xe->name_len + 1 + xe->value_len));
--	rx.hdr_crc = cpu_to_je32(crc32(0, &rx, sizeof(struct jffs2_unknown_node) - 4));
-+	rx.hdr_crc = cpu_to_je32(mtd_crc32(0, &rx, sizeof(struct jffs2_unknown_node) - 4));
- 
- 	rx.xid = cpu_to_je32(xe->xid);
- 	rx.version = cpu_to_je32(1);	/* initial version */
- 	rx.xprefix = xprefix;
- 	rx.name_len = xe->name_len;
- 	rx.value_len = cpu_to_je16(xe->value_len);
--	rx.data_crc = cpu_to_je32(crc32(0, xe->xname, xe->name_len + 1 + xe->value_len));
--	rx.node_crc = cpu_to_je32(crc32(0, &rx, sizeof(rx) - 4));
-+	rx.data_crc = cpu_to_je32(mtd_crc32(0, xe->xname, xe->name_len + 1 + xe->value_len));
-+	rx.node_crc = cpu_to_je32(mtd_crc32(0, &rx, sizeof(rx) - 4));
- 
- 	pad_block_if_less_than(sizeof(rx) + xe->name_len + 1 + xe->value_len);
- 	full_write(out_fd, &rx, sizeof(rx));
-@@ -1211,7 +1208,7 @@ static xattr_entry_t *find_xattr_entry(int xprefix, char *xname, char *xvalue, i
- 		formalize_posix_acl(xvalue, &value_len);
- 
- 	name_len = strlen(xname);
--	index = (crc32(0, xname, name_len) ^ crc32(0, xvalue, value_len)) % XATTRENTRY_HASHSIZE;
-+	index = (mtd_crc32(0, xname, name_len) ^ mtd_crc32(0, xvalue, value_len)) % XATTRENTRY_HASHSIZE;
- 	for (xe = xentry_hash[index]; xe; xe = xe->next) {
- 		if (xe->xprefix == xprefix
- 				&& xe->value_len == value_len
-@@ -1291,11 +1288,11 @@ static void write_xattr_entry(struct filesystem_entry *e)
- 		ref.magic = cpu_to_je16(JFFS2_MAGIC_BITMASK);
- 		ref.nodetype = cpu_to_je16(JFFS2_NODETYPE_XREF);
- 		ref.totlen = cpu_to_je32(sizeof(ref));
--		ref.hdr_crc = cpu_to_je32(crc32(0, &ref, sizeof(struct jffs2_unknown_node) - 4));
-+		ref.hdr_crc = cpu_to_je32(mtd_crc32(0, &ref, sizeof(struct jffs2_unknown_node) - 4));
- 		ref.ino = cpu_to_je32(e->ino);
- 		ref.xid = cpu_to_je32(xe->xid);
- 		ref.xseqno = cpu_to_je32(highest_xseqno += 2);
--		ref.node_crc = cpu_to_je32(crc32(0, &ref, sizeof(ref) - 4));
-+		ref.node_crc = cpu_to_je32(mtd_crc32(0, &ref, sizeof(ref) - 4));
- 
- 		pad_block_if_less_than(sizeof(ref));
- 		full_write(out_fd, &ref, sizeof(ref));
-@@ -1423,7 +1420,7 @@ static void create_target_filesystem(struct filesystem_entry *root)
- 	cleanmarker.magic    = cpu_to_je16(JFFS2_MAGIC_BITMASK);
- 	cleanmarker.nodetype = cpu_to_je16(JFFS2_NODETYPE_CLEANMARKER);
- 	cleanmarker.totlen   = cpu_to_je32(cleanmarker_size);
--	cleanmarker.hdr_crc  = cpu_to_je32(crc32(0, &cleanmarker, sizeof(struct jffs2_unknown_node)-4));
-+	cleanmarker.hdr_crc  = cpu_to_je32(mtd_crc32(0, &cleanmarker, sizeof(struct jffs2_unknown_node)-4));
- 
- 	if (ino == 0)
- 		ino = 1;
-diff --git a/mkfs.ubifs/compr.c b/mkfs.ubifs/compr.c
-index 7f084c5..4152b6a 100644
---- a/mkfs.ubifs/compr.c
-+++ b/mkfs.ubifs/compr.c
-@@ -29,6 +29,7 @@
- 
- #define crc32 __zlib_crc32
- #include <zlib.h>
-+#undef crc32
- 
- #include "compr.h"
- #include "ubifs-media.h"
--- 
-1.7.1
-
diff --git a/package/mtd/mtd.mk b/package/mtd/mtd.mk
index 58ecc87..ae2d433 100644
--- a/package/mtd/mtd.mk
+++ b/package/mtd/mtd.mk
@@ -3,7 +3,7 @@
 # mtd provides jffs2 utilities
 #
 #############################################################
-MTD_VERSION:=1.4.0
+MTD_VERSION:=1.4.1
 MTD_SOURCE:=mtd-utils-$(MTD_VERSION).tar.bz2
 MTD_SITE:=ftp://ftp.infradead.org/pub/mtd-utils
 ifeq ($(BR2_PACKAGE_MTD_MKFSJFFS2),y)
-- 
1.7.1

             reply	other threads:[~2010-10-16 20:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-16 20:20 Peter Korsgaard [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-03-18 12:26 [Buildroot] [git commit master 1/1] mtd: bump version Peter Korsgaard
2011-01-29 23:40 Peter Korsgaard
2010-09-23 12:12 Peter Korsgaard

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=20101016202051.EC7508C006@busybox.osuosl.org \
    --to=jacmet@sunsite.dk \
    --cc=buildroot@busybox.net \
    /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.