diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2021-06-20 12:34:05 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2021-06-20 12:34:05 +0200 |
commit | 83dff7f43154cd41e4d2e5831060a2d2ddc6596e (patch) | |
tree | a9c463cd73f5958857d3c2d687ff8058382c8194 | |
parent | 526b8347906a18d756386092fafa0b42ba0b4563 (diff) | |
download | busybox-w32-83dff7f43154cd41e4d2e5831060a2d2ddc6596e.tar.gz busybox-w32-83dff7f43154cd41e4d2e5831060a2d2ddc6596e.tar.bz2 busybox-w32-83dff7f43154cd41e4d2e5831060a2d2ddc6596e.zip |
lsattr: support more ext2 flags
function old new delta
e2attr_flags_lname 214 285 +71
e2attr_flags_value 52 80 +28
e2attr_flags_sname 14 21 +7
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 106/0) Total: 106 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | e2fsprogs/e2fs_lib.c | 27 | ||||
-rw-r--r-- | include/bb_e2fs_defs.h | 11 |
2 files changed, 25 insertions, 13 deletions
diff --git a/e2fsprogs/e2fs_lib.c b/e2fsprogs/e2fs_lib.c index bc9aa53e5..8d56add2d 100644 --- a/e2fsprogs/e2fs_lib.c +++ b/e2fsprogs/e2fs_lib.c | |||
@@ -158,9 +158,7 @@ const uint32_t e2attr_flags_value[] ALIGN4 = { | |||
158 | EXT2_COMPRBLK_FL, | 158 | EXT2_COMPRBLK_FL, |
159 | EXT2_DIRTY_FL, | 159 | EXT2_DIRTY_FL, |
160 | EXT2_NOCOMPR_FL, | 160 | EXT2_NOCOMPR_FL, |
161 | EXT2_ECOMPR_FL, | ||
162 | #endif | 161 | #endif |
163 | EXT2_INDEX_FL, | ||
164 | EXT2_SECRM_FL, | 162 | EXT2_SECRM_FL, |
165 | EXT2_UNRM_FL, | 163 | EXT2_UNRM_FL, |
166 | EXT2_SYNC_FL, | 164 | EXT2_SYNC_FL, |
@@ -170,26 +168,31 @@ const uint32_t e2attr_flags_value[] ALIGN4 = { | |||
170 | EXT2_NODUMP_FL, | 168 | EXT2_NODUMP_FL, |
171 | EXT2_NOATIME_FL, | 169 | EXT2_NOATIME_FL, |
172 | EXT2_COMPR_FL, | 170 | EXT2_COMPR_FL, |
171 | EXT2_ECOMPR_FL, | ||
173 | EXT3_JOURNAL_DATA_FL, | 172 | EXT3_JOURNAL_DATA_FL, |
173 | EXT2_INDEX_FL, | ||
174 | EXT2_NOTAIL_FL, | 174 | EXT2_NOTAIL_FL, |
175 | EXT2_TOPDIR_FL | 175 | EXT2_TOPDIR_FL, |
176 | EXT2_EXTENT_FL, | ||
177 | EXT2_NOCOW_FL, | ||
178 | EXT2_CASEFOLD_FL, | ||
179 | EXT2_INLINE_DATA_FL, | ||
180 | EXT2_PROJINHERIT_FL, | ||
181 | EXT2_VERITY_FL, | ||
176 | }; | 182 | }; |
177 | 183 | ||
178 | const char e2attr_flags_sname[] ALIGN1 = | 184 | const char e2attr_flags_sname[] ALIGN1 = |
179 | #ifdef ENABLE_COMPRESSION | 185 | #ifdef ENABLE_COMPRESSION |
180 | "BZXE" | 186 | "BZX" |
181 | #endif | 187 | #endif |
182 | "I" | 188 | "suSDiadAcEjItTeCFNPV"; |
183 | "suSDiadAcjtT"; | ||
184 | 189 | ||
185 | static const char e2attr_flags_lname[] ALIGN1 = | 190 | static const char e2attr_flags_lname[] ALIGN1 = |
186 | #ifdef ENABLE_COMPRESSION | 191 | #ifdef ENABLE_COMPRESSION |
187 | "Compressed_File" "\0" | 192 | "Compressed_File" "\0" |
188 | "Compressed_Dirty_File" "\0" | 193 | "Compressed_Dirty_File" "\0" |
189 | "Compression_Raw_Access" "\0" | 194 | "Compression_Raw_Access" "\0" |
190 | "Compression_Error" "\0" | ||
191 | #endif | 195 | #endif |
192 | "Indexed_directory" "\0" | ||
193 | "Secure_Deletion" "\0" | 196 | "Secure_Deletion" "\0" |
194 | "Undelete" "\0" | 197 | "Undelete" "\0" |
195 | "Synchronous_Updates" "\0" | 198 | "Synchronous_Updates" "\0" |
@@ -199,9 +202,17 @@ static const char e2attr_flags_lname[] ALIGN1 = | |||
199 | "No_Dump" "\0" | 202 | "No_Dump" "\0" |
200 | "No_Atime" "\0" | 203 | "No_Atime" "\0" |
201 | "Compression_Requested" "\0" | 204 | "Compression_Requested" "\0" |
205 | "Encrypted" "\0" | ||
202 | "Journaled_Data" "\0" | 206 | "Journaled_Data" "\0" |
207 | "Indexed_directory" "\0" | ||
203 | "No_Tailmerging" "\0" | 208 | "No_Tailmerging" "\0" |
204 | "Top_of_Directory_Hierarchies" "\0" | 209 | "Top_of_Directory_Hierarchies" "\0" |
210 | "Extents" "\0" | ||
211 | "No_COW" "\0" | ||
212 | "Casefold" "\0" | ||
213 | "Inline_Data" "\0" | ||
214 | "Project_Hierarchy" "\0" | ||
215 | "Verity" "\0" | ||
205 | /* Another trailing NUL is added by compiler */; | 216 | /* Another trailing NUL is added by compiler */; |
206 | 217 | ||
207 | void print_e2flags(FILE *f, unsigned long flags, unsigned options) | 218 | void print_e2flags(FILE *f, unsigned long flags, unsigned options) |
diff --git a/include/bb_e2fs_defs.h b/include/bb_e2fs_defs.h index 2d72288ed..608cbf0b0 100644 --- a/include/bb_e2fs_defs.h +++ b/include/bb_e2fs_defs.h | |||
@@ -182,11 +182,12 @@ struct ext2_dx_countlimit { | |||
182 | #define EXT2_NOTAIL_FL 0x00008000 /* file tail should not be merged */ | 182 | #define EXT2_NOTAIL_FL 0x00008000 /* file tail should not be merged */ |
183 | #define EXT2_DIRSYNC_FL 0x00010000 /* Synchronous directory modifications */ | 183 | #define EXT2_DIRSYNC_FL 0x00010000 /* Synchronous directory modifications */ |
184 | #define EXT2_TOPDIR_FL 0x00020000 /* Top of directory hierarchies*/ | 184 | #define EXT2_TOPDIR_FL 0x00020000 /* Top of directory hierarchies*/ |
185 | #define EXT3_EXTENTS_FL 0x00080000 /* Inode uses extents */ | 185 | #define EXT2_EXTENT_FL 0x00080000 /* Extents */ |
186 | #define EXT2_RESERVED_FL 0x80000000 /* reserved for ext2 lib */ | 186 | #define EXT2_VERITY_FL 0x00100000 |
187 | 187 | #define EXT2_NOCOW_FL 0x00800000 /* Do not cow file */ | |
188 | #define EXT2_FL_USER_VISIBLE 0x0003DFFF /* User visible flags */ | 188 | #define EXT2_INLINE_DATA_FL 0x10000000 |
189 | #define EXT2_FL_USER_MODIFIABLE 0x000080FF /* User modifiable flags */ | 189 | #define EXT2_PROJINHERIT_FL 0x20000000 |
190 | #define EXT2_CASEFOLD_FL 0x40000000 | ||
190 | 191 | ||
191 | /* | 192 | /* |
192 | * ioctl commands | 193 | * ioctl commands |