dqblk
struct dqblk dqblk;
} else if (!getfsquota(getq_args.gqa_uid, getq_args.gqa_pathp, &dqblk)) {
dqblk.dqb_bhardlimit;
dqblk.dqb_bsoftlimit;
dqblk.dqb_curblocks;
dqblk.dqb_ihardlimit;
dqblk.dqb_isoftlimit;
dqblk.dqb_curinodes;
dqblk.dqb_btime - timev.tv_sec;
dqblk.dqb_itime - timev.tv_sec;
getfsquota(long id, char *path, struct dqblk *dqblk)
if (quotactl(fs->fs_file, qcmd, id, (char *)dqblk) == 0)
if (lseek(fd, (off_t)(id * sizeof(struct dqblk)), SEEK_SET) ==
switch (read(fd, dqblk, sizeof(struct dqblk))) {
bzero((caddr_t) dqblk, sizeof(struct dqblk));
case sizeof(struct dqblk): /* OK */
int getfsquota(long id, char *path, struct dqblk *dqblk);
struct dqblk dqbuf;
static struct dqblk zerodqbuf;
if (fread((char *)&dqbuf, sizeof(struct dqblk), 1, qfi) == 0)
fseek(qfo, (long)sizeof(struct dqblk), SEEK_CUR);
fwrite((char *)&dqbuf, sizeof(struct dqblk), 1, qfo);
(off_t)((highid[type] + 1) * sizeof(struct dqblk)));
ktrstruct(p, "quota", s, 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));
error = copyout((caddr_t)&dq->dq_dqb, addr, sizeof (struct dqblk));
struct dqblk newlim;
error = copyin(addr, (caddr_t)&newlim, sizeof (struct dqblk));
struct dqblk usage;
error = copyin(addr, (caddr_t)&usage, sizeof (struct dqblk));
struct dqblk dq_dqb; /* actual usage & quotas */
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(&dq->dq_dqb, 0, sizeof(struct dqblk));
ktrquota(const struct dqblk *quota)
struct dqblk quota;
qup->dqblk.dqb_isoftlimit == 0 &&
qup->dqblk.dqb_ihardlimit == 0 &&
qup->dqblk.dqb_bsoftlimit == 0 &&
qup->dqblk.dqb_bhardlimit == 0)
if (qup->dqblk.dqb_ihardlimit &&
qup->dqblk.dqb_curinodes >= qup->dqblk.dqb_ihardlimit)
else if (qup->dqblk.dqb_isoftlimit &&
qup->dqblk.dqb_curinodes >= qup->dqblk.dqb_isoftlimit) {
if (qup->dqblk.dqb_itime > now)
if (qup->dqblk.dqb_bhardlimit &&
qup->dqblk.dqb_curblocks >= qup->dqblk.dqb_bhardlimit)
else if (qup->dqblk.dqb_bsoftlimit &&
qup->dqblk.dqb_curblocks >= qup->dqblk.dqb_bsoftlimit) {
if (qup->dqblk.dqb_btime > now)
qup->dqblk.dqb_curblocks ||
qup->dqblk.dqb_curinodes) {
(int)(dbtob((u_quad_t)qup->dqblk.dqb_curblocks)
(int)(dbtob((u_quad_t)qup->dqblk.dqb_bsoftlimit)
(int)(dbtob((u_quad_t)qup->dqblk.dqb_bhardlimit)
: timeprt(qup->dqblk.dqb_btime));
qup->dqblk.dqb_curinodes,
qup->dqblk.dqb_isoftlimit,
qup->dqblk.dqb_ihardlimit,
: timeprt(qup->dqblk.dqb_itime)
if (quotactl(fs->fs_file, qcmd, id, (char *)&qup->dqblk) != 0) {
(void)lseek(fd, (off_t)(id * sizeof(struct dqblk)), SEEK_SET);
switch (read(fd, &qup->dqblk, sizeof(struct dqblk))) {
memset((caddr_t)&qup->dqblk, 0, sizeof(struct dqblk));
case sizeof(struct dqblk): /* OK */
struct dqblk *dqp = &qup->dqblk;
struct dqblk dqblk;
qup->dqblk.dqb_btime = 0;
qup->dqblk.dqb_itime = 0;
if (quotactl(fs->fs_file, qcmd, id, (char *)&qup->dqblk) != 0) {
lseek(fd, (off_t)(id * sizeof(struct dqblk)), SEEK_SET);
switch (read(fd, &qup->dqblk, sizeof(struct dqblk))) {
bzero((caddr_t)&qup->dqblk,
sizeof(struct dqblk));
case sizeof(struct dqblk): /* OK */
if (quotactl(qup->fsname, qcmd, id, (char *)&qup->dqblk) == 0)
lseek(fd, (off_t)(id * sizeof (struct dqblk)), SEEK_SET);
if (write(fd, &qup->dqblk, sizeof (struct dqblk)) !=
sizeof (struct dqblk))
(int)(dbtob((u_quad_t)qup->dqblk.dqb_curblocks) / 1024),
(int)(dbtob((u_quad_t)qup->dqblk.dqb_bsoftlimit) / 1024),
(int)(dbtob((u_quad_t)qup->dqblk.dqb_bhardlimit) / 1024));
"\tinodes in use:", qup->dqblk.dqb_curinodes,
qup->dqblk.dqb_isoftlimit, qup->dqblk.dqb_ihardlimit);
struct dqblk dqblk;
&dqblk.dqb_curblocks, &dqblk.dqb_bsoftlimit,
&dqblk.dqb_bhardlimit);
dqblk.dqb_curblocks = btodb((u_quad_t)
dqblk.dqb_curblocks * 1024);
dqblk.dqb_bsoftlimit = btodb((u_quad_t)
dqblk.dqb_bsoftlimit * 1024);
dqblk.dqb_bhardlimit = btodb((u_quad_t)
dqblk.dqb_bhardlimit * 1024);
&dqblk.dqb_curinodes, &dqblk.dqb_isoftlimit,
&dqblk.dqb_ihardlimit);
if (dqblk.dqb_bsoftlimit &&
qup->dqblk.dqb_curblocks >= dqblk.dqb_bsoftlimit &&
(qup->dqblk.dqb_bsoftlimit == 0 ||
qup->dqblk.dqb_curblocks <
qup->dqblk.dqb_bsoftlimit))
qup->dqblk.dqb_btime = 0;
if (dqblk.dqb_isoftlimit &&
qup->dqblk.dqb_curinodes >= dqblk.dqb_isoftlimit &&
(qup->dqblk.dqb_isoftlimit == 0 ||
qup->dqblk.dqb_curinodes <
qup->dqblk.dqb_isoftlimit))
qup->dqblk.dqb_itime = 0;
qup->dqblk.dqb_bsoftlimit = dqblk.dqb_bsoftlimit;
qup->dqblk.dqb_bhardlimit = dqblk.dqb_bhardlimit;
qup->dqblk.dqb_isoftlimit = dqblk.dqb_isoftlimit;
qup->dqblk.dqb_ihardlimit = dqblk.dqb_ihardlimit;
if (dqblk.dqb_curblocks == qup->dqblk.dqb_curblocks &&
dqblk.dqb_curinodes == qup->dqblk.dqb_curinodes)
qup->dqblk.dqb_bsoftlimit = 0;
qup->dqblk.dqb_bhardlimit = 0;
qup->dqblk.dqb_isoftlimit = 0;
qup->dqblk.dqb_ihardlimit = 0;
qup->fsname, cvtstoa(qup->dqblk.dqb_btime));
cvtstoa(qup->dqblk.dqb_itime));
qup->dqblk.dqb_btime = bseconds;
qup->dqblk.dqb_itime = iseconds;
qup->dqblk.dqb_btime = 0;
qup->dqblk.dqb_itime = 0;
struct dqblk dqblk;
struct dqblk dqbuf;
static struct dqblk zerodqblk;
fread(&dqbuf, sizeof(struct dqblk), 1, qf);
struct dqblk fu_dqblk;