From: Christoph Hellwig Date: Fri, 28 Nov 2025 06:29:39 +0000 (+0100) Subject: logprint: remove xlog_print_dir2_sf X-Git-Tag: v6.18.0~70 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1fc548d023e370b8be21362b0b2b455c484f8588;p=thirdparty%2Fxfsprogs-dev.git logprint: remove xlog_print_dir2_sf The code has been stubbed out since the initial creation of the xfsprogs repository. Open code the single-line printf in the data fork caller (attr forks can't contain directories) and remove the dead code. Signed-off-by: Christoph Hellwig Reviewed-by: Andrey Albershteyn --- diff --git a/logprint/log_misc.c b/logprint/log_misc.c index 88679e9e..bde7e2a5 100644 --- a/logprint/log_misc.c +++ b/logprint/log_misc.c @@ -504,42 +504,6 @@ xlog_print_trans_inode_core( } } -static void -xlog_print_dir2_sf( - struct xlog *log, - xfs_dir2_sf_hdr_t *sfp, - int size) -{ - __be64 pino; /* parent inode nr */ - xfs_ino_t ino; - int count; - int i; - char namebuf[257]; - xfs_dir2_sf_entry_t *sfep; - - printf(_("SHORTFORM DIRECTORY size %d\n"), - size); - /* bail out for now */ - - return; - - printf(_("SHORTFORM DIRECTORY size %d count %d\n"), - size, sfp->count); - memmove(&pino, &(sfp->parent), sizeof(pino)); - printf(_(".. ino 0x%llx\n"), (unsigned long long) be64_to_cpu(pino)); - - count = sfp->count; - sfep = xfs_dir2_sf_firstentry(sfp); - for (i = 0; i < count; i++) { - ino = libxfs_dir2_sf_get_ino(log->l_mp, sfp, sfep); - memmove(namebuf, (sfep->name), sfep->namelen); - namebuf[sfep->namelen] = '\0'; - printf(_("%s ino 0x%llx namelen %d\n"), - namebuf, (unsigned long long)ino, sfep->namelen); - sfep = libxfs_dir2_sf_nextentry(log->l_mp, sfp, sfep); - } -} - static int xlog_print_trans_inode( struct xlog *log, @@ -643,7 +607,7 @@ xlog_print_trans_inode( case XFS_ILOG_DDATA: printf(_("LOCAL inode data\n")); if (mode == S_IFDIR) - xlog_print_dir2_sf(log, (xfs_dir2_sf_hdr_t *)*ptr, size); + printf(_("SHORTFORM DIRECTORY size %d\n"), size); break; default: ASSERT((f->ilf_fields & XFS_ILOG_DFORK) == 0); @@ -672,8 +636,6 @@ xlog_print_trans_inode( break; case XFS_ILOG_ADATA: printf(_("LOCAL attr data\n")); - if (mode == S_IFDIR) - xlog_print_dir2_sf(log, (xfs_dir2_sf_hdr_t *)*ptr, size); break; default: ASSERT((f->ilf_fields & XFS_ILOG_AFORK) == 0);