Whamcloud - gitweb
lib/e2p: fix a -Wunused-variable warning in getflags()
[tools/e2fsprogs.git] / lib / e2p / e2p.h
index d208b46..5f4793e 100644 (file)
@@ -1,3 +1,12 @@
+/*
+ * e2p.h --- header file for the e2p library
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
+ * %End-Header%
+ */
+
 #include <sys/types.h>         /* Needed by dirent.h on netbsd */
 #include <stdio.h>
 #include <dirent.h>
@@ -7,7 +16,12 @@
 #define E2P_FEATURE_COMPAT     0
 #define E2P_FEATURE_INCOMPAT   1
 #define E2P_FEATURE_RO_INCOMPAT        2
+#define E2P_FEATURE_TYPE_MASK  0x03
+
+#define E2P_FEATURE_NEGATE_FLAG        0x80
 
+#define E2P_FS_FEATURE         0
+#define E2P_JOURNAL_FEATURE    1
 
 /* `options' for print_flags() */
 
@@ -18,11 +32,13 @@ int fgetflags (const char * name, unsigned long * flags);
 int fgetversion (const char * name, unsigned long * version);
 int fsetflags (const char * name, unsigned long flags);
 int fsetversion (const char * name, unsigned long version);
+int fgetproject(const char *name, unsigned long *project);
+int fsetproject(const char *name, unsigned long project);
 int getflags (int fd, unsigned long * flags);
 int getversion (int fd, unsigned long * version);
 int iterate_on_dir (const char * dir_name,
                    int (*func) (const char *, struct dirent *, void *),
-                   void * private);
+                   void * private_arg);
 void list_super(struct ext2_super_block * s);
 void list_super2(struct ext2_super_block * s, FILE *f);
 void print_fs_errors (FILE * f, unsigned short errors);
@@ -31,9 +47,20 @@ void print_fs_state (FILE * f, unsigned short state);
 int setflags (int fd, unsigned long flags);
 int setversion (int fd, unsigned long version);
 
+#define E2P_LIST_JOURNAL_FLAG_FC               0x1
+void e2p_list_journal_super(FILE *f, char *journal_sb_buf,
+                           int exp_block_size, int flags);
+
+void e2p_feature_to_string(int compat, unsigned int mask, char *buf,
+                           size_t buf_len);
 const char *e2p_feature2string(int compat, unsigned int mask);
+const char *e2p_jrnl_feature2string(int compat, unsigned int mask);
 int e2p_string2feature(char *string, int *compat, unsigned int *mask);
+int e2p_jrnl_string2feature(char *string, int *compat_type, unsigned int *mask);
 int e2p_edit_feature(const char *str, __u32 *compat_array, __u32 *ok_array);
+int e2p_edit_feature2(const char *str, __u32 *compat_array, __u32 *ok_array,
+                     __u32 *clear_ok_array, int *type_err,
+                     unsigned int *mask_err);
 
 int e2p_is_null_uuid(void *uu);
 void e2p_uuid_to_str(void *uu, char *out);
@@ -47,6 +74,19 @@ int e2p_string2mntopt(char *string, unsigned int *mask);
 int e2p_edit_mntopts(const char *str, __u32 *mntopts, __u32 ok);
 
 unsigned long parse_num_blocks(const char *arg, int log_block_size);
+unsigned long long parse_num_blocks2(const char *arg, int log_block_size);
 
 char *e2p_os2string(int os_type);
 int e2p_string2os(char *str);
+
+unsigned int e2p_percent(int percent, unsigned int base);
+
+const char *e2p_encmode2string(int num);
+int e2p_string2encmode(char *string);
+
+int e2p_str2encoding(const char *string);
+const char *e2p_encoding2str(int encoding);
+int e2p_get_encoding_flags(int encoding);
+int e2p_str2encoding_flags(int encoding, char *param, __u16 *flags);
+
+const char *e2p_errcode2str(unsigned int err);