xref: /unit/src/nxt_fs.h (revision 1673:883f2f79c2f6)
1 /*
2  * Copyright (C) NGINX, Inc.
3  */
4 
5 #ifndef _NXT_FS_H_INCLUDED_
6 #define _NXT_FS_H_INCLUDED_
7 
8 
9 typedef enum {
10     NXT_FS_UNKNOWN = 0,
11     NXT_FS_BIND,
12     NXT_FS_TMP,
13     NXT_FS_PROC,
14     NXT_FS_LAST,
15 } nxt_fs_type_t;
16 
17 
18 typedef enum {
19     NXT_FS_FLAGS_NOSUID   = 1 << 0,
20     NXT_FS_FLAGS_NOEXEC   = 1 << 1,
21     NXT_FS_FLAGS_NOTIME   = 1 << 2,
22     NXT_FS_FLAGS_NODEV    = 1 << 3,
23     NXT_FS_FLAGS_RDONLY   = 1 << 4,
24 } nxt_fs_flags_t;
25 
26 
27 typedef struct {
28     u_char          *src;
29     u_char          *dst;
30     nxt_fs_type_t   type;
31     u_char          *name;
32     nxt_fs_flags_t  flags;
33     u_char          *data;
34     nxt_uint_t      builtin;  /* 1-bit */
35     nxt_uint_t      deps;     /* 1-bit */
36 } nxt_fs_mount_t;
37 
38 
39 nxt_int_t nxt_fs_mkdir_all(const u_char *dir, mode_t mode);
40 nxt_int_t nxt_fs_mount(nxt_task_t *task, nxt_fs_mount_t *mnt);
41 void nxt_fs_unmount(const u_char *path);
42 
43 
44 #endif  /* _NXT_FS_H_INCLUDED_ */
45