xref: /unit/src/nxt_fs.h (revision 1673)
11489St.nateldemoura@f5.com /*
21489St.nateldemoura@f5.com  * Copyright (C) NGINX, Inc.
31489St.nateldemoura@f5.com  */
41489St.nateldemoura@f5.com 
51489St.nateldemoura@f5.com #ifndef _NXT_FS_H_INCLUDED_
61489St.nateldemoura@f5.com #define _NXT_FS_H_INCLUDED_
71489St.nateldemoura@f5.com 
81489St.nateldemoura@f5.com 
9*1673St.nateldemoura@f5.com typedef enum {
10*1673St.nateldemoura@f5.com     NXT_FS_UNKNOWN = 0,
11*1673St.nateldemoura@f5.com     NXT_FS_BIND,
12*1673St.nateldemoura@f5.com     NXT_FS_TMP,
13*1673St.nateldemoura@f5.com     NXT_FS_PROC,
14*1673St.nateldemoura@f5.com     NXT_FS_LAST,
15*1673St.nateldemoura@f5.com } nxt_fs_type_t;
161580St.nateldemoura@f5.com 
171580St.nateldemoura@f5.com 
18*1673St.nateldemoura@f5.com typedef enum {
19*1673St.nateldemoura@f5.com     NXT_FS_FLAGS_NOSUID   = 1 << 0,
20*1673St.nateldemoura@f5.com     NXT_FS_FLAGS_NOEXEC   = 1 << 1,
21*1673St.nateldemoura@f5.com     NXT_FS_FLAGS_NOTIME   = 1 << 2,
22*1673St.nateldemoura@f5.com     NXT_FS_FLAGS_NODEV    = 1 << 3,
23*1673St.nateldemoura@f5.com     NXT_FS_FLAGS_RDONLY   = 1 << 4,
24*1673St.nateldemoura@f5.com } nxt_fs_flags_t;
251580St.nateldemoura@f5.com 
261489St.nateldemoura@f5.com 
271489St.nateldemoura@f5.com typedef struct {
28*1673St.nateldemoura@f5.com     u_char          *src;
29*1673St.nateldemoura@f5.com     u_char          *dst;
30*1673St.nateldemoura@f5.com     nxt_fs_type_t   type;
31*1673St.nateldemoura@f5.com     u_char          *name;
32*1673St.nateldemoura@f5.com     nxt_fs_flags_t  flags;
33*1673St.nateldemoura@f5.com     u_char          *data;
34*1673St.nateldemoura@f5.com     nxt_uint_t      builtin;  /* 1-bit */
35*1673St.nateldemoura@f5.com     nxt_uint_t      deps;     /* 1-bit */
361489St.nateldemoura@f5.com } nxt_fs_mount_t;
371489St.nateldemoura@f5.com 
381489St.nateldemoura@f5.com 
391489St.nateldemoura@f5.com nxt_int_t nxt_fs_mkdir_all(const u_char *dir, mode_t mode);
401489St.nateldemoura@f5.com nxt_int_t nxt_fs_mount(nxt_task_t *task, nxt_fs_mount_t *mnt);
411489St.nateldemoura@f5.com void nxt_fs_unmount(const u_char *path);
421489St.nateldemoura@f5.com 
431489St.nateldemoura@f5.com 
441489St.nateldemoura@f5.com #endif  /* _NXT_FS_H_INCLUDED_ */
45