blob: d01249db2e898970a291a2137d46c53b71a369a9 [file] [log] [blame]
Denis Vlasenkoc4f623e2006-12-26 01:30:59 +00001/* vi: set sw=4 ts=4: */
2/*
3 * See README for additional information
4 *
5 * This file can be redistributed under the terms of the GNU Library General
6 * Public License
7 */
8
9/* Constants and structures */
10#include "e2fs_defs.h"
11
12/* Iterate a function on each entry of a directory */
13int iterate_on_dir(const char *dir_name,
14 int (*func)(const char *, struct dirent *, void *),
15 void *private);
16
17/* Get/set a file version on an ext2 file system */
18int fgetsetversion(const char *name, unsigned long *get_version, unsigned long set_version);
19#define fgetversion(name, version) fgetsetversion(name, version, 0)
20#define fsetversion(name, version) fgetsetversion(name, NULL, version)
21
22/* Get/set a file flags on an ext2 file system */
23int fgetsetflags(const char *name, unsigned long *get_flags, unsigned long set_flags);
24#define fgetflags(name, flags) fgetsetflags(name, flags, 0)
25#define fsetflags(name, flags) fgetsetflags(name, NULL, flags)
26
27/* Must be 1 for compatibility with `int long_format'. */
28#define PFOPT_LONG 1
29/* Print file attributes on an ext2 file system */
30void print_flags(FILE *f, unsigned long flags, unsigned options);
Denis Vlasenkod059ddc2007-10-30 19:36:07 +000031
32extern const uint32_t e2attr_flags_value[];
33extern const char e2attr_flags_sname[];
34
35/* If you plan to ENABLE_COMPRESSION, see e2fs_lib.c and chattr.c - */
36/* make sure that chattr doesn't accept bad options! */
37#ifdef ENABLE_COMPRESSION
38#define e2attr_flags_value_chattr (&e2attr_flags_value[5])
39#define e2attr_flags_sname_chattr (&e2attr_flags_sname[5])
40#else
41#define e2attr_flags_value_chattr (&e2attr_flags_value[1])
42#define e2attr_flags_sname_chattr (&e2attr_flags_sname[1])
43#endif