[JFFS2] Rename jffs2_summary_node to jffs2_raw_summary

Signed-off-by: Ferenc Havasi <havasi@inf.u-szeged.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
Ferenc Havasi 2005-09-26 12:37:25 +01:00 committed by Thomas Gleixner
parent ef6f0d1ffc
commit 2bc9764c48
3 changed files with 16 additions and 14 deletions

View File

@ -8,7 +8,7 @@
*
* For licensing information, see the file 'LICENCE' in this directory.
*
* $Id: summary.c,v 1.3 2005/09/21 14:43:07 dedekind Exp $
* $Id: summary.c,v 1.4 2005/09/26 11:37:21 havasi Exp $
*
*/
@ -292,7 +292,7 @@ no_mem:
/* Process the stored summary information - helper function for jffs2_sum_scan_sumnode() */
static int jffs2_sum_process_sum_data(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb,
struct jffs2_summary_node *summary, uint32_t *pseudo_random)
struct jffs2_raw_summary *summary, uint32_t *pseudo_random)
{
struct jffs2_raw_node_ref *raw;
struct jffs2_inode_cache *ic;
@ -428,7 +428,7 @@ int jffs2_sum_scan_sumnode(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb
{
struct jffs2_unknown_node crcnode;
struct jffs2_raw_node_ref *cache_ref;
struct jffs2_summary_node *summary;
struct jffs2_raw_summary *summary;
int ret, sumsize;
uint32_t crc;
@ -468,14 +468,14 @@ int jffs2_sum_scan_sumnode(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb
goto crc_err;
}
crc = crc32(0, summary, sizeof(struct jffs2_summary_node)-8);
crc = crc32(0, summary, sizeof(struct jffs2_raw_summary)-8);
if (je32_to_cpu(summary->node_crc) != crc) {
dbg_summary("Summary node is corrupt (bad CRC)\n");
goto crc_err;
}
crc = crc32(0, summary->sum, sumsize - sizeof(struct jffs2_summary_node));
crc = crc32(0, summary->sum, sumsize - sizeof(struct jffs2_raw_summary));
if (je32_to_cpu(summary->sum_crc) != crc) {
dbg_summary("Summary node data is corrupt (bad CRC)\n");
@ -560,7 +560,7 @@ crc_err:
static int jffs2_sum_write_data(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb,
uint32_t infosize, uint32_t datasize, int padsize)
{
struct jffs2_summary_node isum;
struct jffs2_raw_summary isum;
union jffs2_sum_mem *temp;
struct jffs2_sum_marker *sm;
struct kvec vecs[2];
@ -685,7 +685,7 @@ int jffs2_sum_write_sumnode(struct jffs2_sb_info *c)
}
datasize = c->summary->sum_size + sizeof(struct jffs2_sum_marker);
infosize = sizeof(struct jffs2_summary_node) + datasize;
infosize = sizeof(struct jffs2_raw_summary) + datasize;
padsize = jeb->free_size - infosize;
infosize += padsize;
datasize += padsize;

View File

@ -8,7 +8,7 @@
*
* For licensing information, see the file 'LICENCE' in this directory.
*
* $Id: summary.h,v 1.1 2005/09/07 08:34:54 havasi Exp $
* $Id: summary.h,v 1.2 2005/09/26 11:37:21 havasi Exp $
*
*/
@ -142,7 +142,7 @@ struct jffs2_sum_marker
jint32_t magic; /* == JFFS2_SUM_MAGIC */
};
#define JFFS2_SUMMARY_FRAME_SIZE (sizeof(struct jffs2_summary_node) + sizeof(struct jffs2_sum_marker))
#define JFFS2_SUMMARY_FRAME_SIZE (sizeof(struct jffs2_raw_summary) + sizeof(struct jffs2_sum_marker))
#ifdef CONFIG_JFFS2_SUMMARY /* SUMMARY SUPPORT ENABLED */

View File

@ -8,7 +8,7 @@
* For licensing information, see the file 'LICENCE' in the
* jffs2 directory.
*
* $Id: jffs2.h,v 1.37 2005/09/07 08:34:55 havasi Exp $
* $Id: jffs2.h,v 1.38 2005/09/26 11:37:23 havasi Exp $
*
*/
@ -151,9 +151,10 @@ struct jffs2_raw_inode
uint8_t data[0];
} __attribute__((packed));
struct jffs2_summary_node{
struct jffs2_raw_summary
{
jint16_t magic;
jint16_t nodetype; /* = JFFS2_NODETYPE_INODE_SUM */
jint16_t nodetype; /* = JFFS2_NODETYPE_SUMMARY */
jint32_t totlen;
jint32_t hdr_crc;
jint32_t sum_num; /* number of sum entries*/
@ -164,11 +165,12 @@ struct jffs2_summary_node{
jint32_t sum[0]; /* inode summary info */
} __attribute__((packed));
union jffs2_node_union {
union jffs2_node_union
{
struct jffs2_raw_inode i;
struct jffs2_raw_dirent d;
struct jffs2_raw_summary s;
struct jffs2_unknown_node u;
struct jffs2_summary_node s;
};
#endif /* __LINUX_JFFS2_H__ */