From: Vivek Prakash Date: Sun, 13 Nov 2011 04:38:52 +0000 (+0000) Subject: Define flags in sys/stat.h X-Git-Tag: v3.2.0~252 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/openssl_button.gif?a=commitdiff_plain;h=c4bce95897e7d69982156bd0d14e0a7988ff0cfd;p=minix.git Define flags in sys/stat.h --- diff --git a/lib/libutil/Makefile b/lib/libutil/Makefile index 36accd246..839af3a2b 100644 --- a/lib/libutil/Makefile +++ b/lib/libutil/Makefile @@ -17,13 +17,12 @@ SRCS= efun.c getbootfile.c \ passwd.c pw_scan.c pidfile.c pidlock.c pty.c \ raise_default_signal.c \ secure_path.c snprintb.c \ - ttyaction.c login_cap.c + ttyaction.c login_cap.c stat_flags.c \ #disklabel_dkcksum.c disklabel_scan.c \ #if_media.c \ #sockaddr_snprintf.c #getlabelsector.c #getmaxpartitions.c - #stat_flags.c #getrawpartition.c #ttymsg.c #parsedate.y diff --git a/nbsd_include/sys/stat.h b/nbsd_include/sys/stat.h index 79bb8e58b..a451cafa3 100644 --- a/nbsd_include/sys/stat.h +++ b/nbsd_include/sys/stat.h @@ -143,6 +143,25 @@ struct minix_prev_stat { #define S_BLKSIZE 512 /* block size used in the stat struct */ +/* + * Definitions of flags stored in file flags word. + * + * Super-user and owner changeable flags. + */ +#define UF_SETTABLE 0x0000ffff /* mask of owner changeable flags */ +#define UF_NODUMP 0x00000001 /* do not dump file */ +#define UF_IMMUTABLE 0x00000002 /* file may not be changed */ +#define UF_APPEND 0x00000004 /* writes to file may only append */ +#define UF_OPAQUE 0x00000008 /* directory is opaque wrt. union */ + +/* + * Super-user changeable flags. + */ +#define SF_SETTABLE 0xffff0000 /* mask of superuser changeable flags */ +#define SF_ARCHIVED 0x00010000 /* file is archived */ +#define SF_IMMUTABLE 0x00020000 /* file may not be changed */ +#define SF_APPEND 0x00040000 /* writes to file may only append */ + #endif /* _NETBSD_SOURCE */ #if defined(__minix)