summaryrefslogtreecommitdiffstats
path: root/sys/sys
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
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')
-rw-r--r--sys/sys/param.h2
-rw-r--r--sys/sys/stat.h16
-rw-r--r--sys/sys/types.h5
3 files changed, 17 insertions, 6 deletions
diff --git a/sys/sys/param.h b/sys/sys/param.h
index e38b318..fe77232 100644
--- a/sys/sys/param.h
+++ b/sys/sys/param.h
@@ -52,7 +52,7 @@
* there.
*/
#undef __FreeBSD_version
-#define __FreeBSD_version 500029 /* Master, propagated to newvers */
+#define __FreeBSD_version 500030 /* Master, propagated to newvers */
#ifndef NULL
#define NULL 0
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 *));
diff --git a/sys/sys/types.h b/sys/sys/types.h
index b28481d..f01d985 100644
--- a/sys/sys/types.h
+++ b/sys/sys/types.h
@@ -138,6 +138,11 @@ typedef _BSD_CLOCKID_T_ clockid_t;
#undef _BSD_CLOCKID_T_
#endif
+#ifdef _BSD_FFLAGS_T_
+typedef _BSD_FFLAGS_T_ fflags_t; /* file flags */
+#undef _BSD_FFLAGS_T_
+#endif
+
/* XXX: Deprecated; now defined in <arpa/inet.h>. */
#ifndef _IN_ADDR_T_DECLARED_
typedef __uint32_t in_addr_t;
OpenPOWER on IntegriCloud