diff options
Diffstat (limited to 'usr.sbin/mtree/misc.c')
| -rw-r--r-- | usr.sbin/mtree/misc.c | 18 |
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; +} |
