StuBS
definitions.h File Reference
#include "types.h"
Include dependency graph for definitions.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  DIR
 

Macros

#define MAX_SYMLINK_LEN   4095
 
#define MAX_DEPTH   6
 
#define SEEK_SET   0 /* seek relative to beginning of file */
 
#define SEEK_CUR   1 /* seek relative to current file position */
 
#define SEEK_END   2 /* seek relative to end of file */
 
#define S_IFMT   0170000
 
#define S_IFSOCK   0140000
 
#define S_IFLNK   0120000
 
#define S_IFREG   0100000
 
#define S_IFBLK   0060000
 
#define S_IFDIR   0040000
 
#define S_IFCHR   0020000
 
#define S_IFIFO   0010000
 
#define S_ISUID   0004000
 
#define S_ISGID   0002000
 
#define S_ISVTX   0001000
 
#define S_ISLNK(m)   (((m) & S_IFMT) == S_IFLNK)
 
#define S_ISREG(m)   (((m) & S_IFMT) == S_IFREG)
 
#define S_ISDIR(m)   (((m) & S_IFMT) == S_IFDIR)
 
#define S_ISCHR(m)   (((m) & S_IFMT) == S_IFCHR)
 
#define S_ISBLK(m)   (((m) & S_IFMT) == S_IFBLK)
 
#define S_ISFIFO(m)   (((m) & S_IFMT) == S_IFIFO)
 
#define S_ISSOCK(m)   (((m) & S_IFMT) == S_IFSOCK)
 
#define DT_UNKNOWN   0
 
#define DT_FIFO   1
 
#define DT_CHR   2
 
#define DT_DIR   4
 
#define DT_BLK   6
 
#define DT_REG   8
 
#define DT_LNK   10
 
#define DT_SOCK   12
 
#define DT_WHT   14
 
#define O_ACCMODE   00000003
 
#define O_RDONLY   00000000
 
#define O_WRONLY   00000001
 
#define O_RDWR   00000002
 
#define O_CREAT   00000100
 
#define O_EXCL   00000200
 

Typedefs

typedef long off_t
 
typedef unsigned long ino_t
 
typedef unsigned short umode_t
 
typedef long time_t
 
typedef short uid_t
 
typedef char gid_t
 
typedef uint32_t nlink_t
 
typedef short dev_t
 
typedef uint32_t blksize_t
 
typedef uint32_t blkcnt_t
 

Class Documentation

◆ DIR

struct DIR
Class Members
int fd
size_t offset
size_t size
char buf[4096]

Macro Definition Documentation

◆ MAX_SYMLINK_LEN

#define MAX_SYMLINK_LEN   4095

◆ MAX_DEPTH

#define MAX_DEPTH   6

◆ SEEK_SET

#define SEEK_SET   0 /* seek relative to beginning of file */

◆ SEEK_CUR

#define SEEK_CUR   1 /* seek relative to current file position */

◆ SEEK_END

#define SEEK_END   2 /* seek relative to end of file */

◆ S_IFMT

#define S_IFMT   0170000

◆ S_IFSOCK

#define S_IFSOCK   0140000

◆ S_IFLNK

#define S_IFLNK   0120000

◆ S_IFREG

#define S_IFREG   0100000

◆ S_IFBLK

#define S_IFBLK   0060000

◆ S_IFDIR

#define S_IFDIR   0040000

◆ S_IFCHR

#define S_IFCHR   0020000

◆ S_IFIFO

#define S_IFIFO   0010000

◆ S_ISUID

#define S_ISUID   0004000

◆ S_ISGID

#define S_ISGID   0002000

◆ S_ISVTX

#define S_ISVTX   0001000

◆ S_ISLNK

#define S_ISLNK (   m)    (((m) & S_IFMT) == S_IFLNK)

◆ S_ISREG

#define S_ISREG (   m)    (((m) & S_IFMT) == S_IFREG)

◆ S_ISDIR

#define S_ISDIR (   m)    (((m) & S_IFMT) == S_IFDIR)

◆ S_ISCHR

#define S_ISCHR (   m)    (((m) & S_IFMT) == S_IFCHR)

◆ S_ISBLK

#define S_ISBLK (   m)    (((m) & S_IFMT) == S_IFBLK)

◆ S_ISFIFO

#define S_ISFIFO (   m)    (((m) & S_IFMT) == S_IFIFO)

◆ S_ISSOCK

#define S_ISSOCK (   m)    (((m) & S_IFMT) == S_IFSOCK)

◆ DT_UNKNOWN

#define DT_UNKNOWN   0

◆ DT_FIFO

#define DT_FIFO   1

◆ DT_CHR

#define DT_CHR   2

◆ DT_DIR

#define DT_DIR   4

◆ DT_BLK

#define DT_BLK   6

◆ DT_REG

#define DT_REG   8

◆ DT_LNK

#define DT_LNK   10

◆ DT_SOCK

#define DT_SOCK   12

◆ DT_WHT

#define DT_WHT   14

◆ O_ACCMODE

#define O_ACCMODE   00000003

◆ O_RDONLY

#define O_RDONLY   00000000

◆ O_WRONLY

#define O_WRONLY   00000001

◆ O_RDWR

#define O_RDWR   00000002

◆ O_CREAT

#define O_CREAT   00000100

◆ O_EXCL

#define O_EXCL   00000200

Typedef Documentation

◆ off_t

typedef long off_t

◆ ino_t

typedef unsigned long ino_t

◆ umode_t

typedef unsigned short umode_t

◆ time_t

typedef long time_t

◆ uid_t

typedef short uid_t

◆ gid_t

typedef char gid_t

◆ nlink_t

typedef uint32_t nlink_t

◆ dev_t

typedef short dev_t

◆ blksize_t

◆ blkcnt_t

typedef uint32_t blkcnt_t