The branch main has been updated by des:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=57aa63022065facb4560681663cb186cc07a17de

commit 57aa63022065facb4560681663cb186cc07a17de
Author:     Dag-Erling Smørgrav <d...@freebsd.org>
AuthorDate: 2023-02-02 23:11:38 +0000
Commit:     Dag-Erling Smørgrav <d...@freebsd.org>
CommitDate: 2023-02-02 23:16:17 +0000

    tarfs: Remove unused code.
    
    Sponsored by:   Juniper Networks, Inc.
    Sponsored by:   Klara, Inc.
---
 sys/fs/tarfs/tarfs.h      |  2 --
 sys/fs/tarfs/tarfs_subr.c | 80 -----------------------------------------------
 2 files changed, 82 deletions(-)

diff --git a/sys/fs/tarfs/tarfs.h b/sys/fs/tarfs/tarfs.h
index dffd60ee6d8a..444d7b39941d 100644
--- a/sys/fs/tarfs/tarfs.h
+++ b/sys/fs/tarfs/tarfs.h
@@ -232,14 +232,12 @@ int       tarfs_alloc_node(struct tarfs_mount *tmp, const 
char *name,
            unsigned int flags, const char *linkname, dev_t rdev,
            struct tarfs_node *parent, struct tarfs_node **node);
 int    tarfs_load_blockmap(struct tarfs_node *tnp, size_t realsize);
-void   tarfs_dump_tree(struct tarfs_node *tnp);
 void   tarfs_free_node(struct tarfs_node *tnp);
 struct tarfs_node *
        tarfs_lookup_dir(struct tarfs_node *tnp, off_t cookie);
 struct tarfs_node *
        tarfs_lookup_node(struct tarfs_node *tnp, struct tarfs_node *f,
            struct componentname *cnp);
-void   tarfs_print_node(struct tarfs_node *tnp);
 int    tarfs_read_file(struct tarfs_node *tnp, size_t len, struct uio *uiop);
 
 int    tarfs_io_init(struct tarfs_mount *tmp);
diff --git a/sys/fs/tarfs/tarfs_subr.c b/sys/fs/tarfs/tarfs_subr.c
index 0aec225dead9..fc2955b44606 100644
--- a/sys/fs/tarfs/tarfs_subr.c
+++ b/sys/fs/tarfs/tarfs_subr.c
@@ -89,86 +89,6 @@ SYSCTL_INT(_vfs_tarfs, OID_AUTO, debug, CTLFLAG_RW | 
CTLFLAG_TUN,
     &tarfs_debug, 0, "Tar filesystem debug mask");
 #endif /* TARFS_DEBUG */
 
-static void
-tarfs_dump_tree_internal(struct tarfs_node *tnp, int indent)
-{
-       struct tarfs_node *current;
-       const char *name;
-
-       if (tnp->type != VDIR)
-               return;
-
-       TAILQ_FOREACH(current, &tnp->dir.dirhead, dirents) {
-               if (current->name == NULL)
-                       name = "<<root>>";
-               else
-                       name = current->name;
-               printf("%*s%s\n", indent * 4, "", name);
-               if (current->type == VDIR)
-                       tarfs_dump_tree_internal(current, indent + 1);
-       }
-}
-
-void
-tarfs_dump_tree(struct tarfs_node *tnp)
-{
-       const char *name;
-
-       if (tnp == NULL)
-               return;
-
-       if (tnp->name == NULL)
-               name = "<<root>>";
-       else
-               name = tnp->name;
-       printf("%s\n", name);
-
-       tarfs_dump_tree_internal(tnp, 1);
-}
-
-void
-tarfs_print_node(struct tarfs_node *tnp)
-{
-
-       if (tnp == NULL)
-               return;
-
-       printf("%s: node %p\n", __func__, tnp);
-       printf("\tvnode %p\n", tnp->vnode);
-       printf("\ttmp %p\n", tnp->tmp);
-       printf("\ttype %d\n", tnp->type);
-       printf("\tino %lu\n", (unsigned long)tnp->ino);
-       printf("\tsize %zu\n", tnp->size);
-       printf("\tname %s\n",
-           (tnp->name == NULL) ? "<<root>>" : tnp->name);
-       printf("\tnamelen %zu\n", tnp->namelen);
-       printf("\tuid %d\n", tnp->uid);
-       printf("\tgid %d\n", tnp->gid);
-       printf("\tmode o%o\n", tnp->mode);
-       printf("\tflags %u\n", tnp->flags);
-       printf("\tnlink %lu\n", (unsigned long)tnp->nlink);
-       printf("\tatime %d\n", (int)tnp->atime.tv_sec);
-       printf("\tmtime %d\n", (int)tnp->mtime.tv_sec);
-       printf("\tctime %d\n", (int)tnp->ctime.tv_sec);
-       printf("\tbirthtime %d\n", (int)tnp->birthtime.tv_sec);
-       printf("\tgen %lu\n", tnp->gen);
-       printf("\tparent %p\n", tnp->parent);
-
-       switch (tnp->type) {
-       case VDIR:
-               printf("\tdir.lastcookie %jd\n",
-                   tnp->dir.lastcookie);
-               printf("\tdir.lastnode %p\n", tnp->dir.lastnode);
-               break;
-       case VBLK:
-       case VCHR:
-               printf("\trdev %lu\n", (unsigned long)tnp->rdev);
-               break;
-       default:
-               break;
-       }
-}
-
 struct tarfs_node *
 tarfs_lookup_node(struct tarfs_node *tnp, struct tarfs_node *f,
     struct componentname *cnp)

Reply via email to