home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / e2p / e2p.h
Encoding:
C/C++ Source or Header  |  2008-10-18  |  2.2 KB  |  63 lines

  1. #include <sys/types.h>        /* Needed by dirent.h on netbsd */
  2. #include <stdio.h>
  3. #include <dirent.h>
  4.  
  5. #include <ext2fs/ext2_fs.h>
  6.  
  7. #define E2P_FEATURE_COMPAT    0
  8. #define E2P_FEATURE_INCOMPAT    1
  9. #define E2P_FEATURE_RO_INCOMPAT    2
  10. #define E2P_FEATURE_TYPE_MASK    0x03
  11.  
  12. #define E2P_FEATURE_NEGATE_FLAG    0x80
  13.  
  14. #define E2P_FS_FEATURE        0
  15. #define E2P_JOURNAL_FEATURE    1
  16.  
  17. /* `options' for print_flags() */
  18.  
  19. #define PFOPT_LONG  1 /* Must be 1 for compatibility with `int long_format'. */
  20.  
  21.  
  22. int fgetflags (const char * name, unsigned long * flags);
  23. int fgetversion (const char * name, unsigned long * version);
  24. int fsetflags (const char * name, unsigned long flags);
  25. int fsetversion (const char * name, unsigned long version);
  26. int getflags (int fd, unsigned long * flags);
  27. int getversion (int fd, unsigned long * version);
  28. int iterate_on_dir (const char * dir_name,
  29.             int (*func) (const char *, struct dirent *, void *),
  30.             void * private);
  31. void list_super(struct ext2_super_block * s);
  32. void list_super2(struct ext2_super_block * s, FILE *f);
  33. void print_fs_errors (FILE * f, unsigned short errors);
  34. void print_flags (FILE * f, unsigned long flags, unsigned options);
  35. void print_fs_state (FILE * f, unsigned short state);
  36. int setflags (int fd, unsigned long flags);
  37. int setversion (int fd, unsigned long version);
  38.  
  39. const char *e2p_feature2string(int compat, unsigned int mask);
  40. int e2p_string2feature(char *string, int *compat, unsigned int *mask);
  41. int e2p_edit_feature(const char *str, __u32 *compat_array, __u32 *ok_array);
  42. int e2p_edit_feature2(const char *str, __u32 *compat_array, __u32 *ok_array,
  43.               __u32 *clear_ok_array, int *type_err,
  44.               unsigned int *mask_err);
  45.  
  46. int e2p_is_null_uuid(void *uu);
  47. void e2p_uuid_to_str(void *uu, char *out);
  48. const char *e2p_uuid2str(void *uu);
  49.  
  50. const char *e2p_hash2string(int num);
  51. int e2p_string2hash(char *string);
  52.  
  53. const char *e2p_mntopt2string(unsigned int mask);
  54. int e2p_string2mntopt(char *string, unsigned int *mask);
  55. int e2p_edit_mntopts(const char *str, __u32 *mntopts, __u32 ok);
  56.  
  57. unsigned long parse_num_blocks(const char *arg, int log_block_size);
  58.  
  59. char *e2p_os2string(int os_type);
  60. int e2p_string2os(char *str);
  61.  
  62. unsigned int e2p_percent(int percent, unsigned int base);
  63.