diff options
author | jkar8572 <jkar8572> | 2002-03-27 16:21:26 +0000 |
---|---|---|
committer | jkar8572 <jkar8572> | 2002-03-27 16:21:26 +0000 |
commit | 5975341695e27f23f5a58758954d1ea31c2d0d25 (patch) | |
tree | 5bb3bac1bdc313edffa6552867c8954a5dfeaac7 /quotaio.h | |
parent | a40b9d8688fe0f1f34c70a986d3e408273fed14e (diff) | |
download | linuxquota-5975341695e27f23f5a58758954d1ea31c2d0d25.tar.gz |
Fixed bug in quota(1) return code.
Rewritten detection of kernel version.
Added support for generic interface for both quota formats in kernel.
Diffstat (limited to 'quotaio.h')
-rw-r--r-- | quotaio.h | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -41,6 +41,7 @@ } /* Values for format handling */ +#define QF_UNKNOWN -3 /* Format cannot be detected from filename */ #define QF_TOONEW -2 /* Quota format is too new to handle */ #define QF_ERROR -1 /* There was error while detecting format (maybe unknown format...) */ #define QF_VFSOLD 0 /* Old quota format */ @@ -129,12 +130,13 @@ struct dquot { }; /* Flags for commit function (have effect only when quota in kernel is turned on) */ -#define COMMIT_USAGE 1 -#define COMMIT_LIMITS 2 +#define COMMIT_USAGE QIF_USAGE +#define COMMIT_LIMITS QIF_LIMITS #define COMMIT_ALL (COMMIT_USAGE | COMMIT_LIMITS) /* Structure of quotafile operations */ struct quotafile_ops { + int (*check_file) (int fd, int type); /* Check whether quotafile is in our format */ int (*init_io) (struct quota_handle * h); /* Open quotafile */ int (*new_io) (struct quota_handle * h); /* Create new quotafile */ int (*end_io) (struct quota_handle * h); /* Write all changes and close quotafile */ @@ -153,9 +155,6 @@ static inline void mark_quotafile_info_dirty(struct quota_handle *h) #define QIO_ENABLED(h) ((h)->qh_io_flags & IOFL_QUOTAON) #define QIO_RO(h) ((h)->qh_io_flags & IOFL_RO) -/* Detect format of given quotafile */ -int detect_qf_format(int fd, int type); - /* Check quota format used on specified medium and initialize it */ struct quota_handle *init_io(struct mntent *mnt, int type, int fmt, int flags); |