diff options
author | joe <joe@FreeBSD.org> | 2000-01-27 21:17:01 +0000 |
---|---|---|
committer | joe <joe@FreeBSD.org> | 2000-01-27 21:17:01 +0000 |
commit | f1a9497df5db81a71987fa20f10c831030987e36 (patch) | |
tree | bcca8d67d721cd7e4ca8e7322d19df89912cfd26 /usr.sbin/mtree/compare.c | |
parent | 30f3b614b3b18d86be7ff164b9aba2617637b9c6 (diff) | |
download | FreeBSD-src-f1a9497df5db81a71987fa20f10c831030987e36.zip FreeBSD-src-f1a9497df5db81a71987fa20f10c831030987e36.tar.gz |
Historically file flags (schg, uschg, etc) have been converted from
string to u_long and back using two functions, flags_to_string and
string_to_flags, which co-existed with 'ls'. As time has progressed
more and more other tools have used these private functions to
manipulate the file flags.
Recently I moved these functions from /usr/src/bin/ls to libutil,
but after some discussion with bde it's been decided that they
really ought to go in libc.
There are two already existing libc functions for manipulating file
modes: setmode and getmode. In keeping with these flags_to_string
has been renamed getflags and string_to_flags to setflags.
The manual page could probably be improved upon ;)
Diffstat (limited to 'usr.sbin/mtree/compare.c')
-rw-r--r-- | usr.sbin/mtree/compare.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/mtree/compare.c b/usr.sbin/mtree/compare.c index 9f2db9f..007edb7 100644 --- a/usr.sbin/mtree/compare.c +++ b/usr.sbin/mtree/compare.c @@ -225,9 +225,9 @@ typeerr: LABEL; if ((s->flags & F_FLAGS) && s->st_flags != p->fts_statp->st_flags) { LABEL; (void)printf("%sflags (\"%s\" is not ", tab, - flags_to_string(s->st_flags, "none")); + getflags(s->st_flags, "none")); (void)printf("\"%s\"", - flags_to_string(p->fts_statp->st_flags, "none")); + getflags(p->fts_statp->st_flags, "none")); if (uflag) if (chflags(p->fts_accpath, s->st_flags)) (void)printf(", not modified: %s)\n", |