dqblk
dqblk_getblocks(const struct dqblk *dq, struct quotaval *qv)
dqblk_getfiles(const struct dqblk *dq, struct quotaval *qv)
dqblk_putblocks(const struct quotaval *qv, struct dqblk *dq)
dqblk_putfiles(const struct quotaval *qv, struct dqblk *dq)
struct dqblk dq;
pos = qk->qk_id * sizeof(struct dqblk);
struct dqblk dq;
pos = qk->qk_id * sizeof(struct dqblk);
oqc->oqc_numusers = st.st_size / sizeof(struct dqblk);
oqc->oqc_numgroups = st.st_size / sizeof(struct dqblk);
quotavals_to_dqblk(&blocks, &files, &dqblk);
error = copyout(&dqblk, SCARG(uap, arg), sizeof(dqblk));
error = copyin(SCARG(uap, arg), &dqblk, sizeof(dqblk));
dqblk_to_quotavals(&dqblk, &blocks, &files);
struct dqblk dqblk;
struct dqblk dqb;
struct dqblk dqb;
struct dqblk dq1_dqb; /* d: actual usage & quotas */
struct dqblk dqb;
setquota1(struct mount *mp, u_long id, int type, struct dqblk *dqb)
struct dqblk usage;
error = copyin(addr, (void *)&usage, sizeof (struct dqblk));
aiov.iov_len = sizeof (struct dqblk);
auio.uio_resid = sizeof (struct dqblk);
auio.uio_offset = (off_t)id * sizeof (struct dqblk);
if (auio.uio_resid == sizeof(struct dqblk) && error == 0)
memset((void *)&dq->dq_un.dq1_dqb, 0, sizeof(struct dqblk));
aiov.iov_len = sizeof (struct dqblk);
auio.uio_resid = sizeof (struct dqblk);
auio.uio_offset = (off_t)dq->dq_id * sizeof (struct dqblk);
void lfs_dqblk_to_quotavals(const struct dqblk *,
struct dqblk *);
lfs_dqblk_to_quotavals(const struct dqblk *dqblk,
blocks->qv_hardlimit = dqblk2q2e_limit(dqblk->dqb_bhardlimit);
blocks->qv_softlimit = dqblk2q2e_limit(dqblk->dqb_bsoftlimit);
blocks->qv_usage = dqblk->dqb_curblocks;
blocks->qv_expiretime = dqblk->dqb_btime;
files->qv_hardlimit = dqblk2q2e_limit(dqblk->dqb_ihardlimit);
files->qv_softlimit = dqblk2q2e_limit(dqblk->dqb_isoftlimit);
files->qv_usage = dqblk->dqb_curinodes;
files->qv_expiretime = dqblk->dqb_itime;
struct dqblk *dqblk)
dqblk->dqb_bhardlimit = q2e2dqblk_limit(blocks->qv_hardlimit);
dqblk->dqb_bsoftlimit = q2e2dqblk_limit(blocks->qv_softlimit);
dqblk->dqb_curblocks = blocks->qv_usage;
dqblk->dqb_btime = blocks->qv_expiretime;
dqblk->dqb_ihardlimit = q2e2dqblk_limit(files->qv_hardlimit);
dqblk->dqb_isoftlimit = q2e2dqblk_limit(files->qv_softlimit);
dqblk->dqb_curinodes = files->qv_usage;
dqblk->dqb_itime = files->qv_expiretime;
struct dqblk *);
void dqblk_to_quotavals(const struct dqblk *,
dqblk_to_quotavals(const struct dqblk *dqblk,
blocks->qv_hardlimit = dqblk2q2e_limit(dqblk->dqb_bhardlimit);
blocks->qv_softlimit = dqblk2q2e_limit(dqblk->dqb_bsoftlimit);
blocks->qv_usage = dqblk->dqb_curblocks;
blocks->qv_expiretime = dqblk->dqb_btime;
files->qv_hardlimit = dqblk2q2e_limit(dqblk->dqb_ihardlimit);
files->qv_softlimit = dqblk2q2e_limit(dqblk->dqb_isoftlimit);
files->qv_usage = dqblk->dqb_curinodes;
files->qv_expiretime = dqblk->dqb_itime;
struct dqblk *dqblk)
dqblk->dqb_bhardlimit = q2e2dqblk_limit(blocks->qv_hardlimit);
dqblk->dqb_bsoftlimit = q2e2dqblk_limit(blocks->qv_softlimit);
dqblk->dqb_curblocks = blocks->qv_usage;
dqblk->dqb_btime = blocks->qv_expiretime;
dqblk->dqb_ihardlimit = q2e2dqblk_limit(files->qv_hardlimit);
dqblk->dqb_isoftlimit = q2e2dqblk_limit(files->qv_softlimit);
dqblk->dqb_curinodes = files->qv_usage;
dqblk->dqb_itime = files->qv_expiretime;
struct dqblk dq1_dqb; /* d: actual usage & quotas */
struct dqblk dqb;
setquota1(struct mount *mp, u_long id, int type, struct dqblk *dqb)
struct dqblk usage;
error = copyin(addr, (void *)&usage, sizeof (struct dqblk));
aiov.iov_len = sizeof (struct dqblk);
auio.uio_resid = sizeof (struct dqblk);
auio.uio_offset = (off_t)id * sizeof (struct dqblk);
if (auio.uio_resid == sizeof(struct dqblk) && error == 0)
memset((void *)&dq->dq_un.dq1_dqb, 0, sizeof(struct dqblk));
aiov.iov_len = sizeof (struct dqblk);
auio.uio_resid = sizeof (struct dqblk);
auio.uio_offset = (off_t)dq->dq_id * sizeof (struct dqblk);
struct dqblk dqblk;
&dqblk);
(off_t)(id * (long)sizeof (struct dqblk)),
if (write(fd, &dqblk, sizeof (struct dqblk)) !=
sizeof (struct dqblk))
struct dqblk dqblk;
(void)lseek(fd, (off_t)(id * sizeof(struct dqblk)),
switch (read(fd, &dqblk, sizeof(struct dqblk))) {
memset(&dqblk, 0, sizeof(struct dqblk));
case sizeof(struct dqblk): /* OK */
dqblk_to_quotavals(&dqblk,
struct dqblk dqbuf;
static struct dqblk zerodqbuf;
if (fread((char *)&dqbuf, sizeof(struct dqblk), 1, qfi) == 0)
(void) fseeko(qfo, (off_t)id * sizeof(struct dqblk),
(void) fwrite(&dqbuf, sizeof(struct dqblk), 1, qfo);
(off_t)((highid[type] + 1) * sizeof(struct dqblk)));
struct dqblk dqbuf;
(void)fseeko(qfi, (off_t)to * sizeof(struct dqblk), SEEK_SET);
if (fread((char *)&dqbuf, sizeof(struct dqblk), 1, qfi) == 0)
(void)fseek(qfi, -(long)sizeof(struct dqblk), SEEK_CUR);