nexmon – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | /* source: xio-ext2.c */ |
2 | /* Copyright Gerhard Rieger 2005-2006 */ |
||
3 | /* Published under the GNU General Public License V.2, see file COPYING */ |
||
4 | |||
5 | /* this file contains the source for handling Linux ext2fs options |
||
6 | they can also be set with chattr(1) and viewed with lsattr(1) */ |
||
7 | |||
8 | #include "xiosysincludes.h" |
||
9 | #include "xioopen.h" |
||
10 | |||
11 | #include "xio-ext2.h" |
||
12 | |||
13 | |||
14 | #if WITH_EXT2 |
||
15 | |||
16 | /****** FD options ******/ |
||
17 | |||
18 | #ifdef EXT2_SECRM_FL |
||
19 | /* secure deletion, chattr 's' */ |
||
20 | const struct optdesc opt_ext2_secrm = { "ext2-secrm", "secrm", OPT_EXT2_SECRM, GROUP_REG, PH_FD, TYPE_BOOL, OFUNC_IOCTL_MASK_LONG, EXT2_IOC_GETFLAGS, EXT2_IOC_SETFLAGS, EXT2_SECRM_FL }; |
||
21 | #endif /* EXT2_SECRM_FL */ |
||
22 | |||
23 | #ifdef EXT2_UNRM_FL |
||
24 | /* undelete, chattr 'u' */ |
||
25 | const struct optdesc opt_ext2_unrm = { "ext2-unrm", "unrm", OPT_EXT2_UNRM, GROUP_REG, PH_FD, TYPE_BOOL, OFUNC_IOCTL_MASK_LONG, EXT2_IOC_GETFLAGS, EXT2_IOC_SETFLAGS, EXT2_UNRM_FL }; |
||
26 | #endif /* EXT2_UNRM_FL */ |
||
27 | |||
28 | #ifdef EXT2_COMPR_FL |
||
29 | /* compress file, chattr 'c' */ |
||
30 | const struct optdesc opt_ext2_compr = { "ext2-compr", "compr", OPT_EXT2_COMPR, GROUP_REG, PH_FD, TYPE_BOOL, OFUNC_IOCTL_MASK_LONG, EXT2_IOC_GETFLAGS, EXT2_IOC_SETFLAGS, EXT2_COMPR_FL }; |
||
31 | #endif /* EXT2_COMPR_FL */ |
||
32 | |||
33 | #ifdef EXT2_SYNC_FL |
||
34 | /* synchronous update, chattr 'S' */ |
||
35 | const struct optdesc opt_ext2_sync = { "ext2-sync", "sync", OPT_EXT2_SYNC, GROUP_REG, PH_FD, TYPE_BOOL, OFUNC_IOCTL_MASK_LONG, EXT2_IOC_GETFLAGS, EXT2_IOC_SETFLAGS, EXT2_SYNC_FL }; |
||
36 | #endif /* EXT2_SYNC_FL */ |
||
37 | |||
38 | #ifdef EXT2_IMMUTABLE_FL |
||
39 | /* immutable file, chattr 'i' */ |
||
40 | const struct optdesc opt_ext2_immutable = { "ext2-immutable", "immutable", OPT_EXT2_IMMUTABLE, GROUP_REG, PH_FD, TYPE_BOOL, OFUNC_IOCTL_MASK_LONG, EXT2_IOC_GETFLAGS, EXT2_IOC_SETFLAGS, EXT2_IMMUTABLE_FL }; |
||
41 | #endif /* EXT2_IMMUTABLE_FL */ |
||
42 | |||
43 | #ifdef EXT2_APPEND_FL |
||
44 | /* writes to file may only append, chattr 'a' */ |
||
45 | const struct optdesc opt_ext2_append = { "ext2-append", "append", OPT_EXT2_APPEND, GROUP_REG, PH_FD, TYPE_BOOL, OFUNC_IOCTL_MASK_LONG, EXT2_IOC_GETFLAGS, EXT2_IOC_SETFLAGS, EXT2_APPEND_FL }; |
||
46 | #endif /* EXT2_APPEND_FL */ |
||
47 | |||
48 | #ifdef EXT2_NODUMP_FL |
||
49 | /* do not dump file, chattr 'd' */ |
||
50 | const struct optdesc opt_ext2_nodump = { "ext2-nodump", "nodump", OPT_EXT2_NODUMP, GROUP_REG, PH_FD, TYPE_BOOL, OFUNC_IOCTL_MASK_LONG, EXT2_IOC_GETFLAGS, EXT2_IOC_SETFLAGS, EXT2_NODUMP_FL }; |
||
51 | #endif /* EXT2_NODUMP_FL */ |
||
52 | |||
53 | #ifdef EXT2_NOATIME_FL |
||
54 | /* do not update atime, chattr 'A' */ |
||
55 | const struct optdesc opt_ext2_noatime = { "ext2-noatime", "noatime", OPT_EXT2_NOATIME, GROUP_REG, PH_FD, TYPE_BOOL, OFUNC_IOCTL_MASK_LONG, EXT2_IOC_GETFLAGS, EXT2_IOC_SETFLAGS, EXT2_NOATIME_FL }; |
||
56 | #endif /* EXT2_NOATIME_FL */ |
||
57 | |||
58 | /* EXT2_DIRTY_FL ??? */ |
||
59 | /* EXT2_COMPRBLK_FL one ore more compress clusters */ |
||
60 | /* EXT2_NOCOMPR_FL access raw compressed data */ |
||
61 | /* EXT2_ECOMPR_FL compression error */ |
||
62 | /* EXT2_BTREE_FL btree format dir */ |
||
63 | /* EXT2_INDEX_FL hash indexed directory */ |
||
64 | /* EXT2_IMAGIC ??? */ |
||
65 | |||
66 | #ifdef EXT2_JOURNAL_DATA_FL |
||
67 | /* file data should be journaled, chattr 'j' */ |
||
68 | const struct optdesc opt_ext2_journal_data = { "ext2-journal-data", "journal-data", OPT_EXT2_JOURNAL_DATA, GROUP_REG, PH_FD, TYPE_BOOL, OFUNC_IOCTL_MASK_LONG, EXT2_IOC_GETFLAGS, EXT2_IOC_SETFLAGS, EXT2_JOURNAL_DATA_FL }; |
||
69 | #endif /* EXT2_JOURNAL_DATA_FL */ |
||
70 | |||
71 | #ifdef EXT2_NOTAIL_FL |
||
72 | /* file tail should not be merged, chattr 't' */ |
||
73 | const struct optdesc opt_ext2_notail = { "ext2-notail", "notail", OPT_EXT2_NOTAIL, GROUP_REG, PH_FD, TYPE_BOOL, OFUNC_IOCTL_MASK_LONG, EXT2_IOC_GETFLAGS, EXT2_IOC_SETFLAGS, EXT2_NOTAIL_FL }; |
||
74 | #endif /* EXT2_NOTAIL_FL */ |
||
75 | |||
76 | #ifdef EXT2_DIRSYNC_FL |
||
77 | /* synchronous directory modifications, chattr 'D' */ |
||
78 | const struct optdesc opt_ext2_dirsync = { "ext2-dirsync", "dirsync", OPT_EXT2_DIRSYNC, GROUP_REG, PH_FD, TYPE_BOOL, OFUNC_IOCTL_MASK_LONG, EXT2_IOC_GETFLAGS, EXT2_IOC_SETFLAGS, EXT2_DIRSYNC_FL }; |
||
79 | #endif /* EXT2_DIRSYNC_FL */ |
||
80 | |||
81 | #ifdef EXT2_TOPDIR_FL |
||
82 | /* top of directory hierarchies, chattr 'T' */ |
||
83 | const struct optdesc opt_ext2_topdir = { "ext2-topdir", "topdir", OPT_EXT2_TOPDIR, GROUP_REG, PH_FD, TYPE_BOOL, OFUNC_IOCTL_MASK_LONG, EXT2_IOC_GETFLAGS, EXT2_IOC_SETFLAGS, EXT2_TOPDIR_FL }; |
||
84 | #endif /* EXT2_TOPDIR_FL */ |
||
85 | |||
86 | /* EXTENTS inode uses extents */ |
||
87 | |||
88 | |||
89 | #endif /* WITH_EXT2 */ |
||
90 | |||
91 |