gfs2_edit: Separate out the journal-related functions to journal.c
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 gfs2_edit: Separate out the journal-related functions to journal.c
Hi,
This patch takes all the code related to dumping journals and puts them all in a separate journal.c. This will later be used for journal parsing.
Regards,
Bob Peterson
Red Hat File Systems
Signed-off-by Bob Peterson <[email protected]>
---
gfs2/edit/Makefile.am +2 -2
@@ -2,9 +2,9 @@ MAINTAINERCLEANFILES = Makefile.in sbin_PROGRAMS = gfs2_edit -noinst_HEADERS = gfs2hex.h hexedit.h extended.h +noinst_HEADERS = gfs2hex.h hexedit.h extended.h journal.h -gfs2_edit_SOURCES = gfs2hex.c hexedit.c savemeta.c extended.c +gfs2_edit_SOURCES = gfs2hex.c hexedit.c savemeta.c extended.c journal.c gfs2_edit_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -DHELPER_PROGRAM \ -I$(top_srcdir)/gfs2/include \
gfs2/edit/hexedit.c +2 -321
347 lines not on this page · raw message
gfs2/edit/hexedit.h +2 -0
@@ -66,6 +66,7 @@ extern const char *block_type_str[15];extern int dsplines;extern int dsp_lines[DMODES ];extern int combined_display; +extern int details;struct gfs2_dirents {uint64_t block;
@@ -228,5 +229,6 @@ extern uint64_t check_keywords(const char *kword);extern uint64_t masterblock (const char *fn);extern void gfs_rgrp_print (struct gfs_rgrp *rg);extern int has_indirect_blocks (void ); +extern uint32_t get_block_type (const struct gfs2_buffer_head *lbh);#endif /* __HEXVIEW_DOT_H__ */
gfs2/edit/journal.c new file +350 -0
350 lines not on this page · raw message
gfs2/edit/journal.h new file +8 -0
@@ -0,0 +1,8 @@ +#ifndef __JOURNAL_DOT_H__ +#define __JOURNAL_DOT_H__ + +extern void dump_journal (const char *journal); +extern uint64_t find_journal_block (const char *journal,uint64_t *j_size); + + +#endif