1 /* ----> DO NOT REMOVE THE FOLLOWING NOTICE <----
\r
3 Copyright (c) 2014-2015 Datalight, Inc.
\r
4 All Rights Reserved Worldwide.
\r
6 This program is free software; you can redistribute it and/or modify
\r
7 it under the terms of the GNU General Public License as published by
\r
8 the Free Software Foundation; use version 2 of the License.
\r
10 This program is distributed in the hope that it will be useful,
\r
11 but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty
\r
12 of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
13 GNU General Public License for more details.
\r
15 You should have received a copy of the GNU General Public License along
\r
16 with this program; if not, write to the Free Software Foundation, Inc.,
\r
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
\r
19 /* Businesses and individuals that for commercial or other reasons cannot
\r
20 comply with the terms of the GPLv2 license may obtain a commercial license
\r
21 before incorporating Reliance Edge into proprietary software for
\r
22 distribution in any form. Visit http://www.datalight.com/reliance-edge for
\r
31 /** Mode bit for a directory. */
\r
32 #define RED_S_IFDIR 0x4000U
\r
34 /** Mode bit for a regular file. */
\r
35 #define RED_S_IFREG 0x8000U
\r
37 /** @brief Test for a directory.
\r
39 #define RED_S_ISDIR(m) (((m) & RED_S_IFDIR) != 0U)
\r
41 /** @brief Test for a regular file.
\r
43 #define RED_S_ISREG(m) (((m) & RED_S_IFREG) != 0U)
\r
46 /** File system is read-only. */
\r
47 #define RED_ST_RDONLY 0x00000001U
\r
49 /** File system ignores suid and sgid bits. */
\r
50 #define RED_ST_NOSUID 0x00000002U
\r
53 /** @brief Status information on an inode.
\r
57 uint8_t st_dev; /**< Volume number of volume containing file. */
\r
58 uint32_t st_ino; /**< File serial number (inode number). */
\r
59 uint16_t st_mode; /**< Mode of file. */
\r
60 uint16_t st_nlink; /**< Number of hard links to the file. */
\r
61 uint64_t st_size; /**< File size in bytes. */
\r
62 #if REDCONF_INODE_TIMESTAMPS == 1
\r
63 uint32_t st_atime; /**< Time of last access (seconds since 01-01-1970). */
\r
64 uint32_t st_mtime; /**< Time of last data modification (seconds since 01-01-1970). */
\r
65 uint32_t st_ctime; /**< Time of last status change (seconds since 01-01-1970). */
\r
67 #if REDCONF_INODE_BLOCKS == 1
\r
68 uint32_t st_blocks; /**< Number of blocks allocated for this object. */
\r
73 /** @brief Status information on a file system volume.
\r
77 uint32_t f_bsize; /**< File system block size. */
\r
78 uint32_t f_frsize; /**< Fundamental file system block size. */
\r
79 uint32_t f_blocks; /**< Total number of blocks on file system in units of f_frsize. */
\r
80 uint32_t f_bfree; /**< Total number of free blocks. */
\r
81 uint32_t f_bavail; /**< Number of free blocks available to non-privileged process. */
\r
82 uint32_t f_files; /**< Total number of file serial numbers. */
\r
83 uint32_t f_ffree; /**< Total number of free file serial numbers. */
\r
84 uint32_t f_favail; /**< Number of file serial numbers available to non-privileged process. */
\r
85 uint32_t f_fsid; /**< File system ID (useless, populated with zero). */
\r
86 uint32_t f_flag; /**< Bit mask of f_flag values. Includes read-only file system flag. */
\r
87 uint32_t f_namemax; /**< Maximum filename length. */
\r
88 uint64_t f_maxfsize; /**< Maximum file size (POSIX extension). */
\r
89 uint32_t f_dev; /**< Volume number (POSIX extension). */
\r