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 /include/unistd.h | |
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 'include/unistd.h')
-rw-r--r-- | include/unistd.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/unistd.h b/include/unistd.h index 0295461..825d6d0 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -134,6 +134,7 @@ int ftruncate __P((int, off_t)); #endif int getdomainname __P((char *, int)); int getdtablesize __P((void)); +char *getflags __P((u_long, char *)); int getgrouplist __P((const char *, int, int *, int *)); long gethostid __P((void)); int gethostname __P((char *, int)); @@ -182,6 +183,7 @@ int select __P((int, fd_set *, fd_set *, fd_set *, struct timeval *)); int setdomainname __P((const char *, int)); int setegid __P((gid_t)); int seteuid __P((uid_t)); +int setflags __P((char **, u_long *, u_long *)); int setgroups __P((int, const gid_t *)); void sethostid __P((long)); int sethostname __P((const char *, int)); |