summaryrefslogtreecommitdiffstats
path: root/usr.sbin/makefs
diff options
context:
space:
mode:
authornatano <natano@openbsd.org>2016-10-22 19:20:36 +0000
committernatano <natano@openbsd.org>2016-10-22 19:20:36 +0000
commit794a4ba7e7dc3dc3781bb3f45876fd476e1817e2 (patch)
tree9c10b88037911a2a7a3c3f1383f3e030fc320fac /usr.sbin/makefs
parent$OpenBSD$ (diff)
downloadwireguard-openbsd-794a4ba7e7dc3dc3781bb3f45876fd476e1817e2.tar.xz
wireguard-openbsd-794a4ba7e7dc3dc3781bb3f45876fd476e1817e2.zip
More "debug" code that has to go.
Diffstat (limited to 'usr.sbin/makefs')
-rw-r--r--usr.sbin/makefs/makefs.h3
-rw-r--r--usr.sbin/makefs/walk.c38
2 files changed, 2 insertions, 39 deletions
diff --git a/usr.sbin/makefs/makefs.h b/usr.sbin/makefs/makefs.h
index 7e40e2cc0d2..fbd5726b37a 100644
--- a/usr.sbin/makefs/makefs.h
+++ b/usr.sbin/makefs/makefs.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: makefs.h,v 1.8 2016/10/22 19:17:47 natano Exp $ */
+/* $OpenBSD: makefs.h,v 1.9 2016/10/22 19:20:36 natano Exp $ */
/* $NetBSD: makefs.h,v 1.36 2015/11/25 00:48:49 christos Exp $ */
/*
@@ -159,7 +159,6 @@ typedef struct makefs_fsinfo {
-void dump_fsnodes(fsnode *);
const char * inode_type(mode_t);
int set_option(const option_t *, const char *, char *, size_t);
int set_option_var(const option_t *, const char *, const char *,
diff --git a/usr.sbin/makefs/walk.c b/usr.sbin/makefs/walk.c
index 0759ea41258..be737a97946 100644
--- a/usr.sbin/makefs/walk.c
+++ b/usr.sbin/makefs/walk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: walk.c,v 1.7 2016/10/22 19:17:47 natano Exp $ */
+/* $OpenBSD: walk.c,v 1.8 2016/10/22 19:20:36 natano Exp $ */
/* $NetBSD: walk.c,v 1.29 2015/11/25 00:48:49 christos Exp $ */
/*
@@ -264,42 +264,6 @@ free_fsnodes(fsnode *node)
/*
- * dump_fsnodes --
- * dump the fsnodes from `cur'
- */
-void
-dump_fsnodes(fsnode *root)
-{
- fsnode *cur;
- char path[MAXPATHLEN + 1];
-
- printf("dump_fsnodes: %s %p\n", root->path, root);
- for (cur = root; cur != NULL; cur = cur->next) {
- if (snprintf(path, sizeof(path), "%s/%s", cur->path,
- cur->name) >= (int)sizeof(path))
- errx(1, "Pathname too long.");
-
- printf("%7s: %s", inode_type(cur->type), path);
- if (S_ISLNK(cur->type)) {
- assert(cur->symlink != NULL);
- printf(" -> %s", cur->symlink);
- } else {
- assert (cur->symlink == NULL);
- }
- if (cur->inode->nlink > 1)
- printf(", nlinks=%d", cur->inode->nlink);
- putchar('\n');
-
- if (cur->child) {
- assert (cur->type == S_IFDIR);
- dump_fsnodes(cur->child);
- }
- }
- printf("dump_fsnodes: finished %s/%s\n", root->path, root->name);
-}
-
-
-/*
* inode_type --
* for a given inode type `mode', return a descriptive string.
* for most cases, uses inotype() from mtree/misc.c