| Samsung Internal API reference 2.0

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

stat.h
1 /*
2 * Copyright (C) 2012-2018, Samsung Electronics Co., Ltd.
3 *
4 * File statistics
5 */
6
7 #pragma once
8
9 #include <core/types.h>
10
11 #define S_IRWXU 0700
12 #define S_IRUSR 0400
13 #define S_IWUSR 0200
14 #define S_IXUSR 0100
15 #define S_IRWXG 0070
16 #define S_IRGRP 0040
17 #define S_IWGRP 0020
18 #define S_IXGRP 0010
19 #define S_IRWXO 0007
20 #define S_IROTH 0004
21 #define S_IWOTH 0002
22 #define S_IXOTH 0001
23
24 /* Nodes with S_NO_OPTIMIZE flag should not be unlinked by kernel optimizations
25 * (e.g. shrinker or direct data mapping) */
26 #define S_NO_OPTIMIZE 01000
27
28 #define S_IFMT_SHIFT 16
29 #define S_IFDIR (1 << S_IFMT_SHIFT)
30 #define S_IFREG (2 << S_IFMT_SHIFT)
31 #define S_IFSOCK (3 << S_IFMT_SHIFT)
32 #define S_IFDEV (4 << S_IFMT_SHIFT)
33 #define S_IFMT (7 << S_IFMT_SHIFT)
34
35 #define S_ISREG(type) (((type) & S_IFMT) == S_IFREG)
36 #define S_ISDIR(type) (((type) & S_IFMT) == S_IFDIR)
37 #define S_ISSOCK(type) (((type) & S_IFMT) == S_IFSOCK)
38
39 #define S_NO_DATA (unsigned int)-1
40
41 /* Remote nodes represent files which are not controlled by SK. */
42 #define S_REMOTE 010000
43 #define S_ISREMOTE(type) (((type) & S_REMOTE) == S_REMOTE)
44
48 struct stat {
49 uint32_t st_mode;
50 uint32_t st_uid;
51 uint32_t st_gid;
52 uint32_t st_size;
53 uint32_t st_refcount;
54 };
55
stat::st_gid
uint32_t st_gid
Definition: stat.h:51
stat::st_refcount
uint32_t st_refcount
Definition: stat.h:53
stat
Definition: stat.h:48
stat::st_mode
uint32_t st_mode
Definition: stat.h:49
stat::st_uid
uint32_t st_uid
Definition: stat.h:50
stat::st_size
uint32_t st_size
Definition: stat.h:52