#include #include #include #include #include #include #include #include #include #ifndef FS_NOCOMP_FL #define FS_NOCOMP_FL 0x00000400 /* Don't compress */ #endif #ifndef FS_NOCOW_FL #define FS_NOCOW_FL 0x00800000 /* Do not cow file */ #endif struct flags_name { unsigned long flag; const char short_name; const char *long_name; }; static const struct flags_name flags[]={ /* new */ { FS_NOCOW_FL, 'C', "NOCOW" }, { FS_NOCOMP_FL, 'z', "Not_Compressed" }, /* current */ { FS_SECRM_FL, 's', "Secure_Deletion" }, { FS_UNRM_FL, 'u' , "Undelete" }, { FS_SYNC_FL, 'S', "Synchronous_Updates" }, { FS_DIRSYNC_FL, 'D', "Synchronous_Directory_Updates" }, { FS_IMMUTABLE_FL, 'i', "Immutable" }, { FS_APPEND_FL, 'a', "Append_Only" }, { FS_NODUMP_FL, 'd', "No_Dump" }, { FS_NOATIME_FL, 'A', "No_Atime" }, { FS_COMPR_FL, 'c', "Compression_Requested" }, { FS_COMPRBLK_FL, 'B', "Compressed_File" }, { FS_DIRTY_FL, 'Z', "Compressed_Dirty_File" }, { FS_ECOMPR_FL, 'E', "Compression_Error" }, { FS_JOURNAL_DATA_FL, 'j', "Journaled_Data" }, { FS_INDEX_FL, 'I', "Indexed_directory" }, { FS_NOTAIL_FL, 't', "No_Tailmerging" }, { FS_TOPDIR_FL, 'T', "Top_of_Directory_Hierarchies" }, /* { EXT4_EXTENTS_FL, 'e', "Extents" }, */ /* { EXT4_HUGE_FILE_FL, 'h', "Huge_file" }, */ }; static unsigned long to_set, to_unset; unsigned long c2val(char c) { int i; for(i=0;i