~ubuntu-branches/ubuntu/precise/e2fsprogs/precise-updates

« back to all changes in this revision

Viewing changes to lib/quota/quotaio.h

  • Committer: Package Import Robot
  • Author(s): Kees Cook
  • Date: 2012-02-15 13:48:05 UTC
  • mfrom: (8.4.12 sid)
  • Revision ID: package-import@ubuntu.com-20120215134805-xadjme6zsbboxc9c
Tags: 1.42-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - debian/control: Do not build-depend on dietlibc-dev, which is universe.
  - debian/rules: Block pkg-create-dbgsym from operating on this package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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,
123
 
                                                  char *dqname));
 
123
                                                  void *data),
 
124
                            void *data);
124
125
        /* Function to print format specific file information */
125
126
        int (*report) (struct quota_handle *h, int verbose);
126
127
};
136
137
#define QIO_ENABLED(h)  ((h)->qh_io_flags & IOFL_QUOTAON)
137
138
#define QIO_RO(h)       ((h)->qh_io_flags & IOFL_RO)
138
139
 
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,
141
 
                             int fmt, int flags);
 
140
/* Open existing quotafile of given type (and verify its format) on given
 
141
 * filesystem. */
 
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);
 
144
 
142
145
 
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,
 
148
                            int type, int fmt);
145
149
 
146
150
/* Close quotafile */
147
 
int end_io(struct quota_handle *h);
 
151
errcode_t quota_file_close(struct quota_handle *h);
148
152
 
149
153
/* Get empty quota structure */
150
154
struct dquot *get_empty_dquot(void);
151
155
 
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);
153
157
 
154
158
const char *type2name(int type);
155
159
 
156
160
void update_grace_times(struct dquot *q);
157
161
 
 
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
 
165
 
 
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);
 
169
 
158
170
#endif /* GUARD_QUOTAIO_H */