summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/genext2fs/genext2fs-1.4.1/0001-Fix-warnings-remove-some-unused-macros.patch
diff options
context:
space:
mode:
authorDexuan Cui <dexuan.cui@intel.com>2012-03-29 00:35:09 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-04-02 04:31:48 +0100
commit79c806cb404c2d85aeec45b40ea6adbeae9f6346 (patch)
tree5627bb72a24373b931e6a3d4190335bc904cfd88 /meta/recipes-devtools/genext2fs/genext2fs-1.4.1/0001-Fix-warnings-remove-some-unused-macros.patch
parent84b7541abc2d7e59c22891219fce97d320d3bb33 (diff)
downloadpoky-79c806cb404c2d85aeec45b40ea6adbeae9f6346.tar.gz
genext2fs: support large files and filesystems without using large amounts of memory
update_to_1.95.patch was generated by making a diff bewteen the 1.4.1 release and the latest 1.9.5 version in the cvs repo: http://genext2fs.cvs.sourceforge.net/viewvc/genext2fs/genext2fs/genext2fs.c?revision=1.95 The patches 0001-0019 come from mailing list of genext2fs-devel http://sourceforge.net/mailarchive/forum.php?forum_name=genext2fs-devel&max_rows=100&style=flat&viewmonth=201106 (From OE-Core rev: 8f17e499cf91191727c8767e839738cb39c21655) Signed-off-by: Dexuan Cui <dexuan.cui@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/genext2fs/genext2fs-1.4.1/0001-Fix-warnings-remove-some-unused-macros.patch')
-rw-r--r--meta/recipes-devtools/genext2fs/genext2fs-1.4.1/0001-Fix-warnings-remove-some-unused-macros.patch72
1 files changed, 72 insertions, 0 deletions
diff --git a/meta/recipes-devtools/genext2fs/genext2fs-1.4.1/0001-Fix-warnings-remove-some-unused-macros.patch b/meta/recipes-devtools/genext2fs/genext2fs-1.4.1/0001-Fix-warnings-remove-some-unused-macros.patch
new file mode 100644
index 0000000000..f981b449ba
--- /dev/null
+++ b/meta/recipes-devtools/genext2fs/genext2fs-1.4.1/0001-Fix-warnings-remove-some-unused-macros.patch
@@ -0,0 +1,72 @@
1Upstream-Status: inappropriate
2
3From 1399df7672ec309523bcd067da24d72aa624f783 Mon Sep 17 00:00:00 2001
4From: Corey Minyard <cminyard@mvista.com>
5Date: Wed, 1 Jun 2011 07:51:24 -0500
6Subject: [PATCH 01/19] Fix warnings, remove some unused macros.
7
8These are some annoying warnings with newer toolchains. And NAMLEN is
9never used, so just get rid of it.
10---
11 genext2fs.c | 15 +++++++++------
12 1 files changed, 9 insertions(+), 6 deletions(-)
13
14diff --git a/genext2fs.c b/genext2fs.c
15index f0d797d..284862d 100644
16--- a/genext2fs.c
17+++ b/genext2fs.c
18@@ -107,10 +107,8 @@
19
20 #if HAVE_DIRENT_H
21 # include <dirent.h>
22-# define NAMLEN(dirent) strlen((dirent)->d_name)
23 #else
24 # define dirent direct
25-# define NAMLEN(dirent) (dirent)->d_namlen
26 # if HAVE_SYS_NDIR_H
27 # include <sys/ndir.h>
28 # endif
29@@ -1441,7 +1439,8 @@ mkfile_fs(filesystem *fs, uint32 parent_nod, const char *name, uint32 mode, size
30 if(!(b = (uint8*)calloc(rndup(size, BLOCKSIZE), 1)))
31 error_msg_and_die("not enough mem to read file '%s'", name);
32 if(f)
33- fread(b, size, 1, f); // FIXME: ugly. use mmap() ...
34+ if (fread(b, size, 1, f) != 1) // FIXME: ugly. use mmap() ...
35+ error_msg_and_die("fread failed");
36 extend_blk(fs, nod, b, rndup(size, BLOCKSIZE) / BLOCKSIZE);
37 free(b);
38 }
39@@ -1673,7 +1672,9 @@ add2fs_from_dir(filesystem *fs, uint32 this_nod, int squash_uids, int squash_per
40 if(chdir(dent->d_name) < 0)
41 perror_msg_and_die(dent->d_name);
42 add2fs_from_dir(fs, this_nod, squash_uids, squash_perms, fs_timestamp, stats);
43- chdir("..");
44+ if (chdir("..") == -1)
45+ perror_msg_and_die("..");
46+
47 break;
48 default:
49 break;
50@@ -1687,7 +1688,8 @@ add2fs_from_dir(filesystem *fs, uint32 this_nod, int squash_uids, int squash_per
51 if(chdir(dent->d_name) < 0)
52 perror_msg_and_die(name);
53 add2fs_from_dir(fs, nod, squash_uids, squash_perms, fs_timestamp, stats);
54- chdir("..");
55+ if (chdir("..") == -1)
56+ perror_msg_and_die("..");
57 }
58 continue;
59 }
60@@ -1733,7 +1735,8 @@ add2fs_from_dir(filesystem *fs, uint32 this_nod, int squash_uids, int squash_per
61 if(chdir(dent->d_name) < 0)
62 perror_msg_and_die(name);
63 add2fs_from_dir(fs, nod, squash_uids, squash_perms, fs_timestamp, stats);
64- chdir("..");
65+ if (chdir("..") == -1)
66+ perror_msg_and_die("..");
67 break;
68 default:
69 error_msg("ignoring entry %s", name);
70--
711.7.4.1
72