From nobody Thu Feb 02 23:16:42 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4P7F6L5qnPz3khSc; Thu, 2 Feb 2023 23:16:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4P7F6L5DgLz3R1f; Thu, 2 Feb 2023 23:16:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675379802; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4CATaIYBrofV/kmwjRQ6FqC0NZjRBim2JYnmRWSqadY=; b=Cz0szk8CLZvl+xXpxz+9afIhJ4OCT75BfmU1GJ3q5dBuC3VyvR2zV7drgy7tqJgHcCokfk sJBxisfHG1iNtGEFewPD+acyqQI4pg9zaoAX6Fxr56PJx02RvasEYzr+AtPqUopSbQvtqp Eb6N3T2KLgbGtJmVN/JkVHjAf+JyBnNW1rKeUenRxYYeIl9JSjXGtzGt056E9SwzVDu6Uv iaRbvewazliMateyBFrrywmeMriNS7/MRf9bw6gjS+tEskOeL/fm4uv6jZos0ZlcTy0Tci 0Q8TME0N/tAcZVnsOt+vLYO8zPZgFxylppbzeRARCSF6NRAaKZ6keXpw3+1rhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675379802; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4CATaIYBrofV/kmwjRQ6FqC0NZjRBim2JYnmRWSqadY=; b=sxwoc282Ki9iRGjaCPWWHQW9aekaMDCpCCbu7aPVmg6xmMsHEm7CYNlpDQ73vdANF+xKwA EffTV+PqQu/5Lgx6LN3EapAj9mWI+S31W7niKQbETeCiDu7bWRSwmJTlF7PMBRJuSD7frq 4oShgTQUiEupnFt2KS71/BXJbIKyINeQasijGzvX2pcyVTHp66lKfRB4E2nkOGfXNwIaUm Vta667CqrhQ0oojKb+uBphG/hl6lJ6LptGyGaRyY81zH2PbWesF7UxnovDcDw5/5Hd6VVq 7INYC0NpwqXdmI6rS/fWPA561gvCYLNE6kkW5iPrYv9RjhFr5fluQ6/RI+36tA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675379802; a=rsa-sha256; cv=none; b=sctGS9F2sHDLciel+6fYhBjB1eMmOy5tAWlguPGSyPjIAVnWpnwMf6FaNPwwJU1UlmWLuC pTACLNwLRckHEafwwO1n27ebtV6UVUgVL+HtdTMzrHAxQ7aQv0J3S533CJyy1ZLfjyBPwj wGADl9hRyeW1Iaf9d4k3LNmmI61cm7yXLWq6QFQ7WSqMYLsidgYtWa8u58yFUnUgS3uK1z YzYZ1PzSlxB2Vw7nxuw+2owbfwmfcsV2nlygvim+5a3ush4GjYpCy6bxi11I/nWtGYhk2v nSZbiL43fm+HEmMIn94Hxu5uEVuHPn/L6qmQ8gvo7rEB513xKaGJaeC82+Kv7A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4P7F6L4HSHz1CZS; Thu, 2 Feb 2023 23:16:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 312NGgP8006382; Thu, 2 Feb 2023 23:16:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 312NGgcW006381; Thu, 2 Feb 2023 23:16:42 GMT (envelope-from git) Date: Thu, 2 Feb 2023 23:16:42 GMT Message-Id: <202302022316.312NGgcW006381@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Dag-Erling=20Sm=C3=B8rgrav?= Subject: git: 57aa63022065 - main - tarfs: Remove unused code. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 57aa63022065facb4560681663cb186cc07a17de Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=57aa63022065facb4560681663cb186cc07a17de commit 57aa63022065facb4560681663cb186cc07a17de Author: Dag-Erling Smørgrav AuthorDate: 2023-02-02 23:11:38 +0000 Commit: Dag-Erling Smørgrav 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 = "<>"; - 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 = "<>"; - 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) ? "<>" : 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)