diff options
Diffstat (limited to 'sys/sys/stat.h')
-rw-r--r-- | sys/sys/stat.h | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/sys/sys/stat.h b/sys/sys/stat.h index d2e8dfb..2c830a6 100644 --- a/sys/sys/stat.h +++ b/sys/sys/stat.h @@ -45,7 +45,12 @@ #include <sys/cdefs.h> #include <sys/_types.h> -/* XXX missing blkcnt_t, blksize_t, dev_t. */ +/* XXX missing blkcnt_t, blksize_t. */ + +#ifndef _DEV_T_DECLARED +typedef __dev_t dev_t; +#define _DEV_T_DECLARED +#endif #ifndef _FFLAGS_T_DECLARED typedef __fflags_t fflags_t; @@ -99,12 +104,6 @@ typedef __uid_t uid_t; #include <sys/_timespec.h> #endif -#ifdef _KERNEL /* XXX __dev_t should be in <sys/_types.h>. */ -#define __dev_t udev_t -#else -#define __dev_t dev_t -#endif - #if __BSD_VISIBLE struct ostat { __uint16_t st_dev; /* inode's device */ @@ -126,13 +125,13 @@ struct ostat { #endif /* __BSD_VISIBLE */ struct stat { - __dev_t st_dev; /* inode's device */ + __udev_t st_dev; /* inode's device */ ino_t st_ino; /* inode's number */ mode_t st_mode; /* inode protection mode */ nlink_t st_nlink; /* number of hard links */ uid_t st_uid; /* user ID of the file's owner */ gid_t st_gid; /* group ID of the file's group */ - __dev_t st_rdev; /* device type */ + __udev_t st_rdev; /* device type */ #if __BSD_VISIBLE struct timespec st_atimespec; /* time of last access */ struct timespec st_mtimespec; /* time of last data modification */ @@ -173,13 +172,13 @@ struct stat { #if __BSD_VISIBLE struct nstat { - __dev_t st_dev; /* inode's device */ + __udev_t st_dev; /* inode's device */ ino_t st_ino; /* inode's number */ __uint32_t st_mode; /* inode protection mode */ __uint32_t st_nlink; /* number of hard links */ uid_t st_uid; /* user ID of the file's owner */ gid_t st_gid; /* group ID of the file's group */ - __dev_t st_rdev; /* device type */ + __udev_t st_rdev; /* device type */ struct timespec st_atimespec; /* time of last access */ struct timespec st_mtimespec; /* time of last data modification */ struct timespec st_ctimespec; /* time of last file status change */ @@ -197,8 +196,6 @@ struct nstat { }; #endif -#undef __dev_t - #if __BSD_VISIBLE #define st_atime st_atimespec.tv_sec #define st_mtime st_mtimespec.tv_sec |