From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Price Date: Wed, 12 Jan 2022 19:26:44 +0000 Subject: [Cluster-devel] [PATCH 12/18] libgfs2: Move debugging printf out of build_root() In-Reply-To: <20220112192650.1426415-1-anprice@redhat.com> References: <20220112192650.1426415-1-anprice@redhat.com> Message-ID: <20220112192650.1426415-13-anprice@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit mkfs.gfs2 is the only place it could ever get printed so move it there instead. Signed-off-by: Andrew Price --- gfs2/libgfs2/structures.c | 4 ---- gfs2/mkfs/main_mkfs.c | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gfs2/libgfs2/structures.c b/gfs2/libgfs2/structures.c index 6cc0a8dd..7ac38f92 100644 --- a/gfs2/libgfs2/structures.c +++ b/gfs2/libgfs2/structures.c @@ -450,10 +450,6 @@ int build_root(struct gfs2_sbd *sdp) if (sdp->md.rooti == NULL) return -1; - if (cfg_debug) { - printf("\nRoot directory:\n"); - lgfs2_dinode_print(bh->b_data); - } sdp->md.rooti->bh_owned = 1; return 0; } diff --git a/gfs2/mkfs/main_mkfs.c b/gfs2/mkfs/main_mkfs.c index 56a3b7d2..9a73ff7b 100644 --- a/gfs2/mkfs/main_mkfs.c +++ b/gfs2/mkfs/main_mkfs.c @@ -1343,6 +1343,10 @@ int main(int argc, char *argv[]) printf("%s", _("Done\n")); build_root(&sbd); + if (opts.debug) { + printf("\nRoot directory:\n"); + lgfs2_dinode_print(sbd.md.rooti->i_bh->b_data); + } sbd.sd_root_dir = sbd.md.rooti->i_num; strncpy(sbd.sd_lockproto, opts.lockproto, GFS2_LOCKNAME_LEN - 1); -- 2.34.1