UbixOS V2
2.0
stat.h
Go to the documentation of this file.
1
/*-
2
* Copyright (c) 2002-2018 The UbixOS Project.
3
* All rights reserved.
4
*
5
* This was developed by Christopher W. Olsen for the UbixOS Project.
6
*
7
* Redistribution and use in source and binary forms, with or without modification, are permitted
8
* provided that the following conditions are met:
9
*
10
* 1) Redistributions of source code must retain the above copyright notice, this list of
11
* conditions, the following disclaimer and the list of authors.
12
* 2) Redistributions in binary form must reproduce the above copyright notice, this list of
13
* conditions, the following disclaimer and the list of authors in the documentation and/or
14
* other materials provided with the distribution.
15
* 3) Neither the name of the UbixOS Project nor the names of its contributors may be used to
16
* endorse or promote products derived from this software without specific prior written
17
* permission.
18
*
19
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
20
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
21
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
22
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
24
* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
26
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
*/
28
29
#ifndef _VFS_STAT_H
30
#define _VFS_STAT_H
31
32
#include <
sys/types.h
>
33
34
#define STAT_LSTAT 0x00000001
35
36
#define STAT_NO_FOLLOW 0x00000000
37
#define STAT_FOLLOW 0x00000001
38
39
struct
__timespec
{
40
__time_t
tv_sec
;
/* seconds */
41
long
tv_nsec
;
/* and nanoseconds */
42
};
43
44
struct
stat
{
45
__dev_t
st_dev
;
/* inode's device */
46
ino_t
st_ino
;
/* inode's number */
47
__mode_t
st_mode
;
/* inode protection mode */
48
__nlink_t
st_nlink
;
/* number of hard links */
49
uid_t
st_uid
;
/* user ID of the file's owner */
50
gid_t
st_gid
;
/* group ID of the file's group */
51
__dev_t
st_rdev
;
/* device type */
52
time_t
st_atime
;
/* time of last access */
53
long
__st_atimensec
;
/* nsec of last access */
54
time_t
st_mtime
;
/* time of last data modification */
55
long
__st_mtimensec
;
/* nsec of last data modification */
56
time_t
st_ctime
;
/* time of last file status change */
57
long
__st_ctimensec
;
/* nsec of last file status change */
58
off_t
st_size
;
/* file size, in bytes */
59
blkcnt_t
st_blocks
;
/* blocks allocated for file */
60
blksize_t
st_blksize
;
/* optimal blocksize for I/O */
61
fflags_t
st_flags
;
/* user defined flags for file */
62
__uint32_t
st_gen
;
/* file generation number */
63
__int32_t
st_lspare
;
64
time_t
st_birthtime
;
/* time of file creation */
65
long
st_birthtimensec
;
/* nsec of file creation */
66
unsigned
int
:(8 / 2) * (16 - (
int
)
sizeof
(
struct
__timespec
));
67
unsigned
int
:(8 / 2) * (16 - (
int
)
sizeof
(
struct
__timespec
));
68
};
69
70
#endif
stat::st_size
off_t st_size
Definition:
stat.h:58
stat
Definition:
stat.h:44
stat::__st_atimensec
long __st_atimensec
Definition:
stat.h:53
stat::st_mtime
time_t st_mtime
Definition:
stat.h:54
__dev_t
__uint32_t __dev_t
Definition:
_types.h:48
stat::st_uid
uid_t st_uid
Definition:
stat.h:49
gid_t
__gid_t gid_t
Definition:
types.h:123
stat::st_lspare
__int32_t st_lspare
Definition:
stat.h:63
fflags_t
__fflags_t fflags_t
Definition:
types.h:126
__uint32_t
unsigned int __uint32_t
Definition:
_types.h:38
__mode_t
__uint16_t __mode_t
Definition:
_types.h:49
stat::st_blocks
blkcnt_t st_blocks
Definition:
stat.h:59
stat::st_nlink
__nlink_t st_nlink
Definition:
stat.h:48
stat::st_mode
__mode_t st_mode
Definition:
stat.h:47
ino_t
__ino_t ino_t
Definition:
types.h:93
__timespec::tv_sec
__time_t tv_sec
Definition:
stat.h:40
stat::st_ctime
time_t st_ctime
Definition:
stat.h:56
types.h
stat::__st_ctimensec
long __st_ctimensec
Definition:
stat.h:57
blksize_t
__blksize_t blksize_t
Definition:
types.h:125
stat::st_rdev
__dev_t st_rdev
Definition:
stat.h:51
blkcnt_t
__blkcnt_t blkcnt_t
Definition:
types.h:124
stat::st_flags
fflags_t st_flags
Definition:
stat.h:61
__timespec::tv_nsec
long tv_nsec
Definition:
stat.h:41
stat::st_ino
ino_t st_ino
Definition:
stat.h:46
__int32_t
int __int32_t
Definition:
_types.h:37
time_t
__time_t time_t
Definition:
_timespec.h:7
stat::st_dev
__dev_t st_dev
Definition:
stat.h:45
stat::int
unsigned int
Definition:
stat.h:66
stat::st_atime
time_t st_atime
Definition:
stat.h:52
__time_t
__int32_t __time_t
Definition:
_types.h:50
__timespec
Definition:
stat.h:39
__nlink_t
__uint16_t __nlink_t
Definition:
_types.h:49
stat::st_birthtimensec
long st_birthtimensec
Definition:
stat.h:65
off_t
__int64_t off_t
Definition:
types.h:119
stat::st_birthtime
time_t st_birthtime
Definition:
stat.h:64
stat::st_gid
gid_t st_gid
Definition:
stat.h:50
uid_t
__uid_t uid_t
Definition:
types.h:122
stat::st_blksize
blksize_t st_blksize
Definition:
stat.h:60
stat::__st_mtimensec
long __st_mtimensec
Definition:
stat.h:55
stat::st_gen
__uint32_t st_gen
Definition:
stat.h:62
C:
Dev
git
UbixOS
sys
include
vfs
stat.h
Generated by
1.8.16