summaryrefslogtreecommitdiff
path: root/usr.sbin/mtree/misc.c
diff options
context:
space:
mode:
authorJosef Karthauser <joe@FreeBSD.org>2000-06-28 02:33:17 +0000
committerJosef Karthauser <joe@FreeBSD.org>2000-06-28 02:33:17 +0000
commit7c6e002bd54dbb299d39524acb8dda62e348c61a (patch)
tree45a6bd02c083978f1cbd06a85f5b21c6b509cecd /usr.sbin/mtree/misc.c
parenta588b737eef3d1ff92d4f42e80a339c264966533 (diff)
Notes
Diffstat (limited to 'usr.sbin/mtree/misc.c')
-rw-r--r--usr.sbin/mtree/misc.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/usr.sbin/mtree/misc.c b/usr.sbin/mtree/misc.c
index ea413dd10805..7721ff469dab 100644
--- a/usr.sbin/mtree/misc.c
+++ b/usr.sbin/mtree/misc.c
@@ -44,6 +44,7 @@ static const char rcsid[] =
#include <err.h>
#include <fts.h>
#include <stdio.h>
+#include <unistd.h>
#include "mtree.h"
#include "extern.h"
@@ -109,3 +110,20 @@ keycompare(a, b)
{
return (strcmp(((KEY *)a)->name, ((KEY *)b)->name));
}
+
+char *
+flags_to_string(fflags)
+ u_long fflags;
+{
+ char *string;
+
+ string = fflagstostr(fflags);
+ if (string != NULL && *string == '\0') {
+ free(string);
+ string = strdup("none");
+ }
+ if (string == NULL)
+ err(1, NULL);
+
+ return string;
+}