Tenok
A Linux-like Real-Time Operating System for Robotics and Internet of Things
stat.h
Go to the documentation of this file.
1 
4 #ifndef __STAT_H__
5 #define __STAT_H__
6 
7 #include <sys/types.h>
8 
9 #define S_IFIFO 0 /* FIFO */
10 #define S_IFCHR 1 /* Character device */
11 #define S_IFBLK 2 /* Block device */
12 #define S_IFREG 3 /* Regular file */
13 #define S_IFDIR 4 /* Directory */
14 
15 /* Return type of the fstat() syscall */
16 struct stat {
17  uint8_t st_mode; /* File type */
18  uint32_t st_ino; /* inode number */
19  uint32_t st_rdev; /* Device number */
20  uint32_t st_size; /* Total size in bytes */
21  uint32_t st_blocks; /* Number of the blocks used by the file */
22 };
23 
29 int fstat(int fd, struct stat *statbuf);
30 
39 int mknod(const char *pathname, mode_t mode, dev_t dev);
40 
47 int mkfifo(const char *pathname, mode_t mode);
48 
49 #endif
int mkfifo(const char *pathname, mode_t mode)
Makes a FIFO special file with name pathname.
Definition: file.c:110
int fstat(int fd, struct stat *statbuf)
Return information about a file, in the buffer pointed to by statbuf.
Definition: file.c:80
int mknod(const char *pathname, mode_t mode, dev_t dev)
Create a filesystem node (file, device special file, or named pipe) named pathname,...
Definition: file.c:105
Definition: stat.h:16