xref: /unit/src/nxt_fs.h (revision 1580)
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 
91489St.nateldemoura@f5.com #ifdef MS_BIND
101489St.nateldemoura@f5.com #define NXT_MS_BIND MS_BIND
111489St.nateldemoura@f5.com #else
121489St.nateldemoura@f5.com #define NXT_MS_BIND 0
131489St.nateldemoura@f5.com #endif
141489St.nateldemoura@f5.com 
151489St.nateldemoura@f5.com #ifdef MS_REC
161489St.nateldemoura@f5.com #define NXT_MS_REC MS_BIND
171489St.nateldemoura@f5.com #else
181489St.nateldemoura@f5.com #define NXT_MS_REC 0
191489St.nateldemoura@f5.com #endif
201489St.nateldemoura@f5.com 
21*1580St.nateldemoura@f5.com #ifdef MS_NOSUID
22*1580St.nateldemoura@f5.com #define NXT_MS_NOSUID MS_NOSUID
23*1580St.nateldemoura@f5.com #else
24*1580St.nateldemoura@f5.com #define NXT_MS_NOSUID 0
25*1580St.nateldemoura@f5.com #endif
26*1580St.nateldemoura@f5.com 
27*1580St.nateldemoura@f5.com #ifdef MS_NOEXEC
28*1580St.nateldemoura@f5.com #define NXT_MS_NOEXEC MS_NOEXEC
29*1580St.nateldemoura@f5.com #else
30*1580St.nateldemoura@f5.com #define NXT_MS_NOEXEC 0
31*1580St.nateldemoura@f5.com #endif
32*1580St.nateldemoura@f5.com 
33*1580St.nateldemoura@f5.com #ifdef MS_RELATIME
34*1580St.nateldemoura@f5.com #define NXT_MS_RELATIME MS_RELATIME
35*1580St.nateldemoura@f5.com #else
36*1580St.nateldemoura@f5.com #define NXT_MS_RELATIME 0
37*1580St.nateldemoura@f5.com #endif
38*1580St.nateldemoura@f5.com 
39*1580St.nateldemoura@f5.com #ifdef MS_NODEV
40*1580St.nateldemoura@f5.com #define NXT_MS_NODEV MS_NODEV
41*1580St.nateldemoura@f5.com #else
42*1580St.nateldemoura@f5.com #define NXT_MS_NODEV 0
43*1580St.nateldemoura@f5.com #endif
44*1580St.nateldemoura@f5.com 
451489St.nateldemoura@f5.com 
461489St.nateldemoura@f5.com typedef struct {
471489St.nateldemoura@f5.com     u_char     *src;
481489St.nateldemoura@f5.com     u_char     *dst;
491489St.nateldemoura@f5.com     u_char     *fstype;
501489St.nateldemoura@f5.com     nxt_int_t  flags;
511489St.nateldemoura@f5.com     u_char     *data;
521489St.nateldemoura@f5.com } nxt_fs_mount_t;
531489St.nateldemoura@f5.com 
541489St.nateldemoura@f5.com 
551489St.nateldemoura@f5.com nxt_int_t nxt_fs_mkdir_all(const u_char *dir, mode_t mode);
561489St.nateldemoura@f5.com nxt_int_t nxt_fs_mount(nxt_task_t *task, nxt_fs_mount_t *mnt);
571489St.nateldemoura@f5.com void nxt_fs_unmount(const u_char *path);
581489St.nateldemoura@f5.com 
591489St.nateldemoura@f5.com 
601489St.nateldemoura@f5.com #endif  /* _NXT_FS_H_INCLUDED_ */
61