mirror of
https://gitee.com/openharmony/third_party_f2fs-tools
synced 2024-11-23 10:10:00 +00:00
f2fs_io: show more flags
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
d21dd9aaca
commit
42f739c4c7
@ -186,6 +186,10 @@ static void do_set_verity(int argc, char **argv, const struct cmd_desc *cmd)
|
||||
"f2fs_io getflags [file]\n\n" \
|
||||
"get a flag given the file\n" \
|
||||
"flag can show \n" \
|
||||
" encryption\n" \
|
||||
" nocow(pinned)\n" \
|
||||
" inline_data\n" \
|
||||
" verity\n" \
|
||||
" casefold\n" \
|
||||
" compression\n" \
|
||||
" nocompression\n"
|
||||
@ -222,6 +226,30 @@ static void do_getflags(int argc, char **argv, const struct cmd_desc *cmd)
|
||||
printf("nocompression");
|
||||
exist = 1;
|
||||
}
|
||||
if (flag & FS_ENCRYPT_FL) {
|
||||
if (exist)
|
||||
printf(",");
|
||||
printf("encrypt");
|
||||
exist = 1;
|
||||
}
|
||||
if (flag & FS_VERITY_FL) {
|
||||
if (exist)
|
||||
printf(",");
|
||||
printf("verity");
|
||||
exist = 1;
|
||||
}
|
||||
if (flag & FS_INLINE_DATA_FL) {
|
||||
if (exist)
|
||||
printf(",");
|
||||
printf("inline_data");
|
||||
exist = 1;
|
||||
}
|
||||
if (flag & FS_NOCOW_FL) {
|
||||
if (exist)
|
||||
printf(",");
|
||||
printf("nocow(pinned)");
|
||||
exist = 1;
|
||||
}
|
||||
if (!exist)
|
||||
printf("none");
|
||||
printf("\n");
|
||||
|
@ -110,6 +110,18 @@ typedef u32 __be32;
|
||||
#define F2FS_IOC_FSGETXATTR FS_IOC_FSGETXATTR
|
||||
#define F2FS_IOC_FSSETXATTR FS_IOC_FSSETXATTR
|
||||
|
||||
#ifndef FS_ENCRYPT_FL
|
||||
#define FS_ENCRYPT_FL 0x00000800 /* Encrypted file */
|
||||
#endif
|
||||
#ifndef FS_VERITY_FL
|
||||
#define FS_VERITY_FL 0x00100000 /* Verity protected inode */
|
||||
#endif
|
||||
#ifndef FS_INLINE_DATA_FL
|
||||
#define FS_INLINE_DATA_FL 0x10000000 /* Inline data for regular/symlink files */
|
||||
#endif
|
||||
#ifndef FS_NOCOW_FL
|
||||
#define FS_NOCOW_FL 0x00800000 /* Do not cow file */
|
||||
#endif
|
||||
#ifndef FS_NOCOMP_FL
|
||||
#define FS_NOCOMP_FL 0x00000400 /* Don't compress */
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user