X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/c8ce62bd58873a2298253e039ebbfe6dd872a725..8948cb281481af6bab794ce8f553dec1597a1b06:/tools/mtd-utils/patches/120-cygwin_fixes.patch?ds=sidebyside diff --git a/tools/mtd-utils/patches/120-cygwin_fixes.patch b/tools/mtd-utils/patches/120-cygwin_fixes.patch index ac8bcf32d..3dc21614b 100644 --- a/tools/mtd-utils/patches/120-cygwin_fixes.patch +++ b/tools/mtd-utils/patches/120-cygwin_fixes.patch @@ -1,8 +1,7 @@ -diff -urN mtd-20090505/Makefile mtd-20090505.new/Makefile ---- mtd-20090505/Makefile 2009-06-05 16:59:08.000000000 +0200 -+++ mtd-20090505.new/Makefile 2010-01-05 11:11:24.000000000 +0100 -@@ -7,6 +7,11 @@ - CPPFLAGS += -DWITHOUT_XATTR +--- a/Makefile ++++ b/Makefile +@@ -12,6 +12,11 @@ else + LZOLDLIBS = -llzo2 endif +ifeq ($(shell uname -o),Cygwin) @@ -10,10 +9,10 @@ diff -urN mtd-20090505/Makefile mtd-20090505.new/Makefile +endif + +ifneq ($(shell uname -o),Cygwin) - SUBDIRS = ubi-utils mkfs.ubifs + SUBDIRS = lib ubi-utils mkfs.ubifs + TESTS = tests - TARGETS = ftl_format flash_erase flash_eraseall nanddump doc_loadbios \ -@@ -17,6 +22,10 @@ +@@ -23,6 +28,10 @@ TARGETS = ftl_format flash_erase nanddum rfddump rfdformat \ serve_image recv_image \ sumtool #jffs2reader @@ -21,12 +20,11 @@ diff -urN mtd-20090505/Makefile mtd-20090505.new/Makefile +SUBDIRS = +TARGETS = mkfs.jffs2 +endif + SCRIPTS = flash_eraseall SYMLINKS = - -diff -urN mtd-20090505/include/cygwin/bits-byteswap.h mtd-20090505.new/include/cygwin/bits-byteswap.h ---- mtd-20090505/include/cygwin/bits-byteswap.h 1970-01-01 01:00:00.000000000 +0100 -+++ mtd-20090505.new/include/cygwin/bits-byteswap.h 2010-01-05 11:09:45.000000000 +0100 +--- /dev/null ++++ b/include/cygwin/bits-byteswap.h @@ -0,0 +1,132 @@ +/* Macros to swap the order of bytes in integer values. + Copyright (C) 1997, 1998, 2000, 2002 Free Software Foundation, Inc. @@ -160,9 +158,8 @@ diff -urN mtd-20090505/include/cygwin/bits-byteswap.h mtd-20090505.new/include/c +#endif + +#endif /* _BITS_BYTESWAP_H */ -diff -urN mtd-20090505/include/cygwin/byteswap.h mtd-20090505.new/include/cygwin/byteswap.h ---- mtd-20090505/include/cygwin/byteswap.h 1970-01-01 01:00:00.000000000 +0100 -+++ mtd-20090505.new/include/cygwin/byteswap.h 2010-01-05 11:09:45.000000000 +0100 +--- /dev/null ++++ b/include/cygwin/byteswap.h @@ -0,0 +1,40 @@ +/* Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. @@ -204,9 +201,8 @@ diff -urN mtd-20090505/include/cygwin/byteswap.h mtd-20090505.new/include/cygwin +#endif + +#endif /* byteswap.h */ -diff -urN mtd-20090505/include/cygwin/endian.h mtd-20090505.new/include/cygwin/endian.h ---- mtd-20090505/include/cygwin/endian.h 1970-01-01 01:00:00.000000000 +0100 -+++ mtd-20090505.new/include/cygwin/endian.h 2010-01-05 11:43:10.000000000 +0100 +--- /dev/null ++++ b/include/cygwin/endian.h @@ -0,0 +1,26 @@ +#ifndef _CYGENDIAN_H_ +#define _CYGENDIAN_H_ @@ -234,9 +230,8 @@ diff -urN mtd-20090505/include/cygwin/endian.h mtd-20090505.new/include/cygwin/e +#endif /* __CYGWIN__ */ + +#endif /* _CYGENDIAN_H_ */ -diff -urN mtd-20090505/include/cygwin/ioctl.h mtd-20090505.new/include/cygwin/ioctl.h ---- mtd-20090505/include/cygwin/ioctl.h 1970-01-01 01:00:00.000000000 +0100 -+++ mtd-20090505.new/include/cygwin/ioctl.h 2010-01-05 11:09:45.000000000 +0100 +--- /dev/null ++++ b/include/cygwin/ioctl.h @@ -0,0 +1,38 @@ +#ifndef _CYGIOCTL_H_ +#define _CYGIOCTL_H_ @@ -276,9 +271,8 @@ diff -urN mtd-20090505/include/cygwin/ioctl.h mtd-20090505.new/include/cygwin/io +#endif /* __CYGWIN__ */ + +#endif /* _CYGIOCTL_H_ */ -diff -urN mtd-20090505/include/cygwin/pread.c mtd-20090505.new/include/cygwin/pread.c ---- mtd-20090505/include/cygwin/pread.c 1970-01-01 01:00:00.000000000 +0100 -+++ mtd-20090505.new/include/cygwin/pread.c 2010-01-05 11:09:45.000000000 +0100 +--- /dev/null ++++ b/include/cygwin/pread.c @@ -0,0 +1,41 @@ +#ifdef __CYGWIN__ + @@ -321,9 +315,8 @@ diff -urN mtd-20090505/include/cygwin/pread.c mtd-20090505.new/include/cygwin/pr +} + +#endif /* __CYGWIN__ */ -diff -urN mtd-20090505/lnconf.sh mtd-20090505.new/lnconf.sh ---- mtd-20090505/lnconf.sh 1970-01-01 01:00:00.000000000 +0100 -+++ mtd-20090505.new/lnconf.sh 2010-01-05 11:09:45.000000000 +0100 +--- /dev/null ++++ b/lnconf.sh @@ -0,0 +1,53 @@ +#!/bin/sh +# @@ -378,12 +371,11 @@ diff -urN mtd-20090505/lnconf.sh mtd-20090505.new/lnconf.sh + +lndir "$tdir" + -diff -urN mtd-20090505/mkfs.jffs2.c mtd-20090505.new/mkfs.jffs2.c ---- mtd-20090505/mkfs.jffs2.c 2009-06-05 16:59:08.000000000 +0200 -+++ mtd-20090505.new/mkfs.jffs2.c 2010-01-05 11:25:52.000000000 +0100 -@@ -75,6 +75,14 @@ - #include "crc32.h" +--- a/mkfs.jffs2.c ++++ b/mkfs.jffs2.c +@@ -77,6 +77,14 @@ #include "rbtree.h" + #include "common.h" +#ifdef __CYGWIN__ +#include @@ -396,7 +388,7 @@ diff -urN mtd-20090505/mkfs.jffs2.c mtd-20090505.new/mkfs.jffs2.c /* Do not use the weird XPG version of basename */ #undef basename -@@ -474,7 +482,7 @@ +@@ -376,7 +384,7 @@ static struct filesystem_entry *recursiv the following macros use it if available or use a hacky workaround... */ @@ -405,10 +397,10 @@ diff -urN mtd-20090505/mkfs.jffs2.c mtd-20090505.new/mkfs.jffs2.c #define SCANF_PREFIX "a" #define SCANF_STRING(s) (&s) #define GETCWD_SIZE 0 -@@ -557,6 +565,14 @@ +@@ -459,6 +467,14 @@ static int interpret_table_entry(struct } entry = find_filesystem_entry(root, name, mode); - if (entry) { + if (entry && !(count > 0 && (type == 'c' || type == 'b'))) { + /* Check the type */ + if ((mode & S_IFMT) != (entry->sb.st_mode & S_IFMT)) { + error_msg ("skipping device_table entry '%s': type mismatch!", name); @@ -420,7 +412,7 @@ diff -urN mtd-20090505/mkfs.jffs2.c mtd-20090505.new/mkfs.jffs2.c /* Ok, we just need to fixup the existing entry * and we will be all done... */ entry->sb.st_uid = uid; -@@ -566,11 +582,21 @@ +@@ -468,11 +484,21 @@ static int interpret_table_entry(struct entry->sb.st_rdev = makedev(major, minor); } } else { @@ -442,8 +434,8 @@ diff -urN mtd-20090505/mkfs.jffs2.c mtd-20090505.new/mkfs.jffs2.c + } free(tmp); if (parent == NULL) { - error_msg ("skipping device_table entry '%s': no parent directory!", name); -@@ -584,6 +610,7 @@ + errmsg ("skipping device_table entry '%s': no parent directory!", name); +@@ -486,6 +512,7 @@ static int interpret_table_entry(struct add_host_filesystem_entry(name, hostpath, uid, gid, mode, 0, parent); break; case 'f': @@ -451,10 +443,9 @@ diff -urN mtd-20090505/mkfs.jffs2.c mtd-20090505.new/mkfs.jffs2.c add_host_filesystem_entry(name, hostpath, uid, gid, mode, 0, parent); break; case 'p': -diff -urN mtd-20090505/ubi-utils/src/libubi.c mtd-20090505.new/ubi-utils/src/libubi.c ---- mtd-20090505/ubi-utils/src/libubi.c 2009-06-05 16:59:08.000000000 +0200 -+++ mtd-20090505.new/ubi-utils/src/libubi.c 2010-01-05 11:46:24.000000000 +0100 -@@ -30,6 +30,9 @@ +--- a/ubi-utils/src/libubi.c ++++ b/ubi-utils/src/libubi.c +@@ -32,6 +32,9 @@ #include #include #include