tarfs: Remove unused code.
Sponsored by: Juniper Networks, Inc. Sponsored by: Klara, Inc.
This commit is contained in:
parent
cf93505e8d
commit
57aa630220
@ -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);
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user