public inbox for cluster-cvs@sourceware.org help / color / mirror / Atom feed
From: Bob Peterson <rpeterso@fedoraproject.org> To: cluster-cvs-relay@redhat.com Subject: cluster: STABLE2 - GFS2: gfs2_edit prints wrong directory entry type for gfs1 Date: Mon, 31 Aug 2009 17:53:00 -0000 [thread overview] Message-ID: <20090831175328.38FC912025B@lists.fedorahosted.org> (raw) Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=275adfb353d1cc975772dcd4d6687de16a1ab223 Commit: 275adfb353d1cc975772dcd4d6687de16a1ab223 Parent: 2f07da23c9e8d93647ba4525614f2ff4e8d32e6a Author: Bob Peterson <bob@ganesha.peterson> AuthorDate: Mon Aug 31 12:02:57 2009 -0500 Committer: Bob Peterson <rpeterso@redhat.com> CommitterDate: Mon Aug 31 12:55:09 2009 -0500 GFS2: gfs2_edit prints wrong directory entry type for gfs1 This patch adds the ability for gfs2_edit to correctly interpret gfs1 directory entry types. rhbz#503529 --- gfs2/edit/hexedit.c | 36 +++++++++++++++++++++++++++++++++--- 1 files changed, 33 insertions(+), 3 deletions(-) diff --git a/gfs2/edit/hexedit.c b/gfs2/edit/hexedit.c index 0e76c83..8f34d67 100644 --- a/gfs2/edit/hexedit.c +++ b/gfs2/edit/hexedit.c @@ -1174,6 +1174,38 @@ int has_indirect_blocks(void) /* ------------------------------------------------------------------------ */ void print_inode_type(__be16 de_type) { + if (gfs1) { + switch(de_type) { + case GFS_FILE_NON: + print_gfs2("Unknown"); + break; + case GFS_FILE_REG: + print_gfs2("File "); + break; + case GFS_FILE_DIR: + print_gfs2("Dir "); + break; + case GFS_FILE_LNK: + print_gfs2("Symlink"); + break; + case GFS_FILE_BLK: + print_gfs2("BlkDev "); + break; + case GFS_FILE_CHR: + print_gfs2("ChrDev "); + break; + case GFS_FILE_FIFO: + print_gfs2("Fifo "); + break; + case GFS_FILE_SOCK: + print_gfs2("Socket "); + break; + default: + print_gfs2("%04x ", de_type); + break; + } + return; + } switch(de_type) { case DT_UNKNOWN: print_gfs2("Unknown"); @@ -1238,10 +1270,8 @@ int display_leaf(struct iinfo *ind) strcpy(edit_fmt, "%"PRIx64); } } - print_gfs2("%d. (%d). %lld (0x%llx) / %lld (0x%llx): ", + print_gfs2("%d. (%d). %lld (0x%llx): ", total_dirents, d + 1, - ind->ii[0].dirent[d].dirent.de_inum.no_formal_ino, - ind->ii[0].dirent[d].dirent.de_inum.no_formal_ino, ind->ii[0].dirent[d].block, ind->ii[0].dirent[d].block); }
reply other threads:[~2009-08-31 17:53 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20090831175328.38FC912025B@lists.fedorahosted.org \ --to=rpeterso@fedoraproject.org \ --cc=cluster-cvs-relay@redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).