blob: 07af08b6ec9bdb15724e8a4314f6f8a5d89e5541 [file] [log] [blame]
Theodore Ts'o50e1e101997-04-26 13:58:21 +00001#include <sys/types.h> /* Needed by dirent.h on netbsd */
Theodore Ts'o3839e651997-04-26 13:21:57 +00002#include <stdio.h>
Theodore Ts'o50e1e101997-04-26 13:58:21 +00003#include <dirent.h>
Theodore Ts'o3839e651997-04-26 13:21:57 +00004
5#include <linux/ext2_fs.h>
6
Theodore Ts'od7b701d1999-09-14 20:17:38 +00007#define E2P_FEATURE_COMPAT 0
8#define E2P_FEATURE_INCOMPAT 1
9#define E2P_FEATURE_RO_INCOMPAT 2
10
Theodore Ts'odede39b2000-02-11 04:48:03 +000011
12/* `options' for print_flags() */
13
14#define PFOPT_LONG 1 /* Must be 1 for compatibility with `int long_format'. */
15
16
Theodore Ts'o3839e651997-04-26 13:21:57 +000017int fgetflags (const char * name, unsigned long * flags);
18int fgetversion (const char * name, unsigned long * version);
19int fsetflags (const char * name, unsigned long flags);
20int fsetversion (const char * name, unsigned long version);
21int getflags (int fd, unsigned long * flags);
22int getversion (int fd, unsigned long * version);
23int iterate_on_dir (const char * dir_name,
24 int (*func) (const char *, struct dirent *, void *),
25 void * private);
26void list_super (struct ext2_super_block * s);
27void print_fs_errors (FILE * f, unsigned short errors);
Theodore Ts'odede39b2000-02-11 04:48:03 +000028void print_flags (FILE * f, unsigned long flags, unsigned options);
Theodore Ts'o3839e651997-04-26 13:21:57 +000029void print_fs_state (FILE * f, unsigned short state);
30int setflags (int fd, unsigned long flags);
31int setversion (int fd, unsigned long version);
Theodore Ts'o1e3472c1997-04-29 14:53:37 +000032
Theodore Ts'o36caf251999-10-26 14:29:22 +000033const char *e2p_feature2string(int compat, unsigned int mask);
Theodore Ts'od7b701d1999-09-14 20:17:38 +000034int e2p_string2feature(char *string, int *compat, unsigned int *mask);
Theodore Ts'o36caf251999-10-26 14:29:22 +000035int e2p_edit_feature(const char *str, __u32 *compat_array, __u32 *ok_array);
Theodore Ts'od7b701d1999-09-14 20:17:38 +000036
Theodore Ts'o1e3472c1997-04-29 14:53:37 +000037int e2p_is_null_uuid(void *uu);
38void e2p_uuid_to_str(void *uu, char *out);