120
120
/* Scan quotafile and call callback on every structure */
121
121
int (*scan_dquots) (struct quota_handle *h,
122
122
int (*process_dquot) (struct dquot *dquot,
124
125
/* Function to print format specific file information */
125
126
int (*report) (struct quota_handle *h, int verbose);
136
137
#define QIO_ENABLED(h) ((h)->qh_io_flags & IOFL_QUOTAON)
137
138
#define QIO_RO(h) ((h)->qh_io_flags & IOFL_RO)
139
/* Check quota format used on specified medium and initialize it */
140
struct quota_handle *init_io(ext2_filsys fs, const char *mntpt, int type,
140
/* Open existing quotafile of given type (and verify its format) on given
142
errcode_t quota_file_open(struct quota_handle *h, ext2_filsys fs,
143
ext2_ino_t qf_ino, int type, int fmt, int flags);
143
146
/* Create new quotafile of specified format on given filesystem */
144
int new_io(struct quota_handle *h, ext2_filsys fs, int type, int fmt);
147
errcode_t quota_file_create(struct quota_handle *h, ext2_filsys fs,
146
150
/* Close quotafile */
147
int end_io(struct quota_handle *h);
151
errcode_t quota_file_close(struct quota_handle *h);
149
153
/* Get empty quota structure */
150
154
struct dquot *get_empty_dquot(void);
152
void truncate_quota_inode(ext2_filsys fs, ext2_ino_t ino);
156
errcode_t quota_inode_truncate(ext2_filsys fs, ext2_ino_t ino);
154
158
const char *type2name(int type);
156
160
void update_grace_times(struct dquot *q);
162
/* size for the buffer returned by quota_get_qf_name(); must be greater
163
than maxlen of extensions[] and fmtnames[] (plus 2) found in quotaio.c */
164
#define QUOTA_NAME_LEN 16
166
const char *quota_get_qf_name(int type, int fmt, char *buf);
167
const char *quota_get_qf_path(const char *mntpt, int qtype, int fmt,
168
char *path_buf, size_t path_buf_size);
158
170
#endif /* GUARD_QUOTAIO_H */