[Ocfs2-tools-devel] [PATCH 2/4] Ocfs2-tools: Fix a minor bug of fswreck.
Joel Becker
Joel.Becker at oracle.com
Thu Jul 2 14:05:25 PDT 2009
On Fri, Jun 26, 2009 at 10:49:20AM +0800, Tristan Ye wrote:
> Should start the prompt code from index 0 in main program,it's obviously
> a mistake here. The patch also add fprintf description for prompt
> code(DUPLICATE_CLUSTERS).
>
> Signed-off-by: Tristan Ye <tristan.ye at oracle.com>
sob
> ---
> fswreck/inode.c | 5 +++++
> fswreck/main.c | 2 +-
> 2 files changed, 6 insertions(+), 1 deletions(-)
>
> diff --git a/fswreck/inode.c b/fswreck/inode.c
> index 377ce08..70e849e 100644
> --- a/fswreck/inode.c
> +++ b/fswreck/inode.c
> @@ -402,6 +402,11 @@ void mess_up_dup_clusters(ocfs2_filesys *fs, enum fsck_type type,
> if (err)
> FSWRK_COM_FATAL(progname, err);
>
> + fprintf(stdout, "DUPLICATE_CLUSTERS: "
> + "Create two inodes #%"PRIu64" and #%"PRIu64
> + " by allocating same cluster to them.",
> + inode1_blkno, inode2_blkno);
> +
> ocfs2_free(&buf);
> }
>
> diff --git a/fswreck/main.c b/fswreck/main.c
> index 27f79a6..ea15fb7 100644
> --- a/fswreck/main.c
> +++ b/fswreck/main.c
> @@ -420,7 +420,7 @@ int main (int argc, char **argv)
> goto bail;
> }
>
> - for (i = 1; i < NUM_FSCK_TYPE; ++i) {
> + for (i = 0; i < NUM_FSCK_TYPE; ++i) {
> if (corrupt[i]) {
> if (prompt_codes[i].func)
> prompt_codes[i].func(fs, prompt_codes[i].type,
> --
> 1.5.5
>
>
> _______________________________________________
> Ocfs2-tools-devel mailing list
> Ocfs2-tools-devel at oss.oracle.com
> http://oss.oracle.com/mailman/listinfo/ocfs2-tools-devel
--
Life's Little Instruction Book #451
"Don't be afraid to say, 'I'm sorry.'"
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127
More information about the Ocfs2-tools-devel
mailing list