summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/genext2fs/genext2fs-1.4.1/fix-memory-corruption-on-powerpc.patch
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2014-03-20 17:37:41 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-21 12:05:50 +0000
commite2700768308c87db4bde04f6a1026d468489ddf4 (patch)
tree8cc83851c38d99ad5a28878a3d03169201b59751 /meta/recipes-devtools/genext2fs/genext2fs-1.4.1/fix-memory-corruption-on-powerpc.patch
parentb3f83a21931168d089a54e96087c093c0bedab89 (diff)
downloadpoky-e2700768308c87db4bde04f6a1026d468489ddf4.tar.gz
genext2fs: remove it
Remove genext2fs since we don't use it anymore, it can't support ext4 well, either. We have used "mke2fs -d" to instead of it. [YOCTO #6013] (From OE-Core rev: ff5666bc460520aef6105e117d5431c05fd9f55b) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/genext2fs/genext2fs-1.4.1/fix-memory-corruption-on-powerpc.patch')
-rw-r--r--meta/recipes-devtools/genext2fs/genext2fs-1.4.1/fix-memory-corruption-on-powerpc.patch76
1 files changed, 0 insertions, 76 deletions
diff --git a/meta/recipes-devtools/genext2fs/genext2fs-1.4.1/fix-memory-corruption-on-powerpc.patch b/meta/recipes-devtools/genext2fs/genext2fs-1.4.1/fix-memory-corruption-on-powerpc.patch
deleted file mode 100644
index 0ef162c023..0000000000
--- a/meta/recipes-devtools/genext2fs/genext2fs-1.4.1/fix-memory-corruption-on-powerpc.patch
+++ /dev/null
@@ -1,76 +0,0 @@
1Upstream-Status: Submitted
2
3fix memory corruption on powerpc
4
5Signed-off-by: Wrobel Heinz <Heinz.Wrobel@freescale.com>
6
7diff --unified a/genext2fs.c b/genext2fs.c
8--- a/genext2fs.c 2013-08-14 16:50:59.061623605 +0200
9+++ b/genext2fs.c 2013-08-14 16:47:23.349623674 +0200
10@@ -675,21 +675,34 @@
11 }
12
13 static void
14-swap_nod(inode *nod)
15+swap_nod(inode *nod, int fromdisk)
16 {
17 uint32 nblk;
18+ uint32 i_blocks = nod->i_blocks;
19+ uint32 i_size = nod->i_size;
20+ uint16 i_mode = nod->i_mode;
21+
22
23 #define this nod
24 inode_decl
25 #undef this
26
27+ if (fromdisk) {
28+ // Only now do we have the values in the correct
29+ // endianess for the host. So we override the
30+ // earlier assumption
31+ i_blocks = nod->i_blocks;
32+ i_size = nod->i_size;
33+ i_mode = nod->i_mode;
34+ }
35+
36 // block and character inodes store the major and minor in the
37 // i_block, so we need to unswap to get those. Also, if it's
38 // zero iblocks, put the data back like it belongs.
39- nblk = nod->i_blocks / INOBLK;
40- if ((nod->i_size && !nblk)
41- || ((nod->i_mode & FM_IFBLK) == FM_IFBLK)
42- || ((nod->i_mode & FM_IFCHR) == FM_IFCHR))
43+ nblk = i_blocks / INOBLK;
44+ if ((i_size && !nblk)
45+ || ((i_mode & FM_IFBLK) == FM_IFBLK)
46+ || ((i_mode & FM_IFCHR) == FM_IFCHR))
47 {
48 int i;
49 for(i = 0; i <= EXT2_TIND_BLOCK; i++)
50@@ -1066,7 +1079,7 @@
51 nod_info *ni = container_of(elem, nod_info, link);
52
53 if (ni->fs->swapit)
54- swap_nod(ni->itab);
55+ swap_nod(ni->itab, 0);
56 put_blk(ni->bi);
57 free(ni);
58 }
59@@ -1102,7 +1115,7 @@
60 ni->b = get_blk(fs, fs->gd[grp].bg_inode_table + boffset, &ni->bi);
61 ni->itab = ((inode *) ni->b) + offset;
62 if (fs->swapit)
63- swap_nod(ni->itab);
64+ swap_nod(ni->itab, 1);
65
66 out:
67 *rni = ni;
68@@ -1158,6 +1171,8 @@
69 if (dw->fs->swapit)
70 swap_dir(&dw->d);
71 memcpy(dw->last_d, &dw->d, sizeof(directory));
72+ if (dw->fs->swapit)
73+ swap_dir(&dw->d);
74
75 if (((int8 *) next_d) >= ((int8 *) dw->b + BLOCKSIZE))
76 return NULL;