diff options
| author | Josef Karthauser <joe@FreeBSD.org> | 2000-01-27 21:17:01 +0000 |
|---|---|---|
| committer | Josef Karthauser <joe@FreeBSD.org> | 2000-01-27 21:17:01 +0000 |
| commit | 18c0eeddf75ea8c84360302d1d69f6856e455073 (patch) | |
| tree | 71b46c36a1e229a18531be8cbc7820463e64c814 /usr.bin/xinstall | |
| parent | c299f41fd94ac69d50fe1bb6dbc005adbdaedf03 (diff) | |
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 ;)
Notes
svn path=/head/; revision=56692
Diffstat (limited to 'usr.bin/xinstall')
| -rw-r--r-- | usr.bin/xinstall/Makefile | 2 | ||||
| -rw-r--r-- | usr.bin/xinstall/xinstall.c | 3 |
2 files changed, 1 insertions, 4 deletions
diff --git a/usr.bin/xinstall/Makefile b/usr.bin/xinstall/Makefile index 80331806d48b..2c5dc9f79450 100644 --- a/usr.bin/xinstall/Makefile +++ b/usr.bin/xinstall/Makefile @@ -3,8 +3,6 @@ PROG= xinstall MAN1= install.1 -DPADD= ${LIBUTIL} -LDADD= -lutil install: maninstall ${INSTALL} ${COPY} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ diff --git a/usr.bin/xinstall/xinstall.c b/usr.bin/xinstall/xinstall.c index 4665938ebc4c..1db50f1d363a 100644 --- a/usr.bin/xinstall/xinstall.c +++ b/usr.bin/xinstall/xinstall.c @@ -101,7 +101,6 @@ int compare __P((int, const char *, int, const char *, const struct stat *, const struct stat *)); void install __P((char *, char *, u_long, u_int)); void install_dir __P((char *)); -u_long string_to_flags __P((char **, u_long *, u_long *)); void strip __P((char *)); void usage __P((void)); int trymmap __P((int)); @@ -152,7 +151,7 @@ main(argc, argv) break; case 'f': flags = optarg; - if (string_to_flags(&flags, &fset, NULL)) + if (setflags(&flags, &fset, NULL)) errx(EX_USAGE, "%s: invalid flag", flags); iflags |= SETFLAGS; break; |
