diff options
author | Josh Boyer <jwboyer@gmail.com> | 2006-04-11 20:05:27 -0500 |
---|---|---|
committer | Josh Boyer <jwboyer@gmail.com> | 2006-04-11 20:05:27 -0500 |
commit | 092338c8d5e0f05af4a2356d8ce601bd6cdf4c53 (patch) | |
tree | 06bedd424f13cea947243382a9b9611350e2589b /jffs2dump.c | |
parent | 75b15a491cb730f13dce05ae13194d054f90b74d (diff) |
- Update utils to build from in tree include files
- Revert any ebh stuff for now
Signed-off-by: Josh Boyer <jwboyer@gmail.com>
Diffstat (limited to 'jffs2dump.c')
-rw-r--r-- | jffs2dump.c | 37 |
1 files changed, 2 insertions, 35 deletions
diff --git a/jffs2dump.c b/jffs2dump.c index c5179a6..0db0cd7 100644 --- a/jffs2dump.c +++ b/jffs2dump.c @@ -3,7 +3,7 @@ * * Copyright (C) 2003 Thomas Gleixner (tglx@linutronix.de) * - * $Id: jffs2dump.c,v 1.12 2005/11/07 11:15:12 gleixner Exp $ + * $Id: jffs2dump.c,v 1.10 2005/09/26 11:49:39 havasi Exp $ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -37,7 +37,7 @@ #include "summary.h" #define PROGRAM "jffs2dump" -#define VERSION "$Revision: 1.12 $" +#define VERSION "$Revision: 1.10 $" #define PAD(x) (((x)+3)&~3) @@ -379,22 +379,6 @@ void do_dumpcontent (void) break; } - case JFFS2_NODETYPE_ERASEBLOCK_HEADER: - printf ("%8s EBH node at 0x%08x, totlen 0x%08x, compat_fset 0x%02x, incompat_fset 0x%02x, rocompat_fset 0x%02x, erase_count 0x%08x\n", - obsolete ? "Obsolete" : "", p - data, je32_to_cpu (node->eh.totlen), node->eh.compat_fset, - node->eh.incompat_fset, node->eh.rocompat_fset, je32_to_cpu (node->eh.erase_count)); - - crc = crc32(0, p + sizeof(struct jffs2_unknown_node) + 4, je32_to_cpu(node->eh.totlen) - sizeof(struct jffs2_unknown_node) - 4); - if (crc != je32_to_cpu(node->eh.node_crc)) { - printf ("Wrong node_crc at 0x%08x, 0x%08x instead of 0x%08x\n", p - data, je32_to_cpu (node->eh.node_crc), crc); - p += PAD(je32_to_cpu (node->eh.totlen)); - dirty += PAD(je32_to_cpu (node->eh.totlen));; - continue; - } - - p += PAD(je32_to_cpu (node->eh.totlen)); - break; - case JFFS2_NODETYPE_CLEANMARKER: if (verbose) { printf ("%8s Cleanmarker at 0x%08x, totlen 0x%08x\n", @@ -631,23 +615,6 @@ void do_endianconvert (void) break; } - case JFFS2_NODETYPE_ERASEBLOCK_HEADER: - newnode.eh.magic = cnv_e16 (node->eh.magic); - newnode.eh.nodetype = cnv_e16 (node->eh.nodetype); - newnode.eh.totlen = cnv_e32 (node->eh.totlen); - newnode.eh.hdr_crc = cpu_to_e32 (crc32 (0, &newnode, sizeof (struct jffs2_unknown_node) - 4)); - newnode.eh.reserved = node->eh.reserved; - newnode.eh.compat_fset = node->eh.compat_fset; - newnode.eh.incompat_fset = node->eh.incompat_fset; - newnode.eh.rocompat_fset = node->eh.rocompat_fset; - newnode.eh.erase_count = cnv_e32 (node->eh.erase_count); - newnode.eh.node_crc = cpu_to_e32 (crc32 (0, (unsigned char *)&newnode + sizeof(struct jffs2_unknown_node) + 4, - je32_to_cpu(node->eh.totlen) - sizeof(struct jffs2_unknown_node) + 4)); - write(fd, &newnode, sizeof(struct jffs2_raw_ebh)); - write(fd, p + sizeof(struct jffs2_raw_ebh), PAD(je32_to_cpu(node->eh.totlen) - sizeof(struct jffs2_raw_ebh))); - p += PAD(je32_to_cpu (node->eh.totlen)); - break; - case 0xffff: write (fd, p, 4); p += 4; |