summaryrefslogtreecommitdiffstats
path: root/sys/sys/stat.h
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>2002-02-15 22:15:39 +0000
committerwollman <wollman@FreeBSD.org>2002-02-15 22:15:39 +0000
commit7d29dd10d391d0534bdf083001229496fe90bc77 (patch)
tree94a65fae261b7d9b577eba9ba29036301f0dd22b /sys/sys/stat.h
parent173a18f4724c55317f6c5cabcaf35b8fe2a862a4 (diff)
downloadFreeBSD-src-7d29dd10d391d0534bdf083001229496fe90bc77.zip
FreeBSD-src-7d29dd10d391d0534bdf083001229496fe90bc77.tar.gz
Resurrect one of the easiest changes from my big include files roll-up
patch from a year ago: give file flags their own type. This does not (yet) change the type used by system calls or library functions. The underlying type was chosen to match what is returned by stat().
Diffstat (limited to 'sys/sys/stat.h')
-rw-r--r--sys/sys/stat.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/sys/sys/stat.h b/sys/sys/stat.h
index 15367b3..8a03251 100644
--- a/sys/sys/stat.h
+++ b/sys/sys/stat.h
@@ -42,6 +42,14 @@
#ifndef _SYS_STAT_H_
#define _SYS_STAT_H_
+#include <sys/cdefs.h>
+#include <machine/ansi.h>
+
+#ifdef _BSD_FFLAGS_T_
+typedef _BSD_FFLAGS_T_ fflags_t; /* file flags */
+#undef _BSD_FFLAGS_T_
+#endif
+
#if !defined(_KERNEL) && !defined(_POSIX_SOURCE)
/*
* XXX we need this for struct timespec. We get miscellaneous namespace
@@ -71,7 +79,7 @@ struct ostat {
struct timespec st_ctimespec; /* time of last file status change */
int32_t st_blksize; /* optimal blocksize for I/O */
int32_t st_blocks; /* blocks allocated for file */
- u_int32_t st_flags; /* user defined flags for file */
+ fflags_t st_flags; /* user defined flags for file */
u_int32_t st_gen; /* file generation number */
};
#endif /* !_POSIX_SOURCE */
@@ -99,7 +107,7 @@ struct stat {
off_t st_size; /* file size, in bytes */
int64_t st_blocks; /* blocks allocated for file */
u_int32_t st_blksize; /* optimal blocksize for I/O */
- u_int32_t st_flags; /* user defined flags for file */
+ fflags_t st_flags; /* user defined flags for file */
u_int32_t st_gen; /* file generation number */
int32_t st_lspare;
int64_t st_qspare[2];
@@ -129,7 +137,7 @@ struct nstat {
off_t st_size; /* file size, in bytes */
int64_t st_blocks; /* blocks allocated for file */
u_int32_t st_blksize; /* optimal blocksize for I/O */
- u_int32_t st_flags; /* user defined flags for file */
+ fflags_t st_flags; /* user defined flags for file */
u_int32_t st_gen; /* file generation number */
int64_t st_qspare[2];
};
@@ -237,8 +245,6 @@ struct nstat {
#endif /* !_POSIX_SOURCE */
#ifndef _KERNEL
-#include <sys/cdefs.h>
-
__BEGIN_DECLS
int chmod __P((const char *, mode_t));
int fstat __P((int, struct stat *));
OpenPOWER on IntegriCloud