Lines Matching defs:qup
83 static void showrawquotas(int type, u_long id, struct quotause *qup);
85 static int getufsquota(struct fstab *fs, struct quotause *qup, long id,
87 static int getnfsquota(struct statfs *fst, struct quotause *qup, long id,
271 struct quotause *qup;
282 for (qup = quplist; qup; qup = qup->next) {
284 if (qup->dqblk.dqb_ihardlimit &&
285 qup->dqblk.dqb_curinodes >= qup->dqblk.dqb_ihardlimit) {
289 else if (qup->dqblk.dqb_isoftlimit &&
290 qup->dqblk.dqb_curinodes >= qup->dqblk.dqb_isoftlimit) {
292 if (qup->dqblk.dqb_itime > now)
298 if (qup->dqblk.dqb_bhardlimit &&
299 qup->dqblk.dqb_curblocks >= qup->dqblk.dqb_bhardlimit) {
303 else if (qup->dqblk.dqb_bsoftlimit &&
304 qup->dqblk.dqb_curblocks >= qup->dqblk.dqb_bsoftlimit) {
306 if (qup->dqblk.dqb_btime > now)
312 showrawquotas(type, id, qup);
316 qup->dqblk.dqb_isoftlimit == 0 &&
317 qup->dqblk.dqb_ihardlimit == 0 &&
318 qup->dqblk.dqb_bsoftlimit == 0 &&
319 qup->dqblk.dqb_bhardlimit == 0)
326 printf("\t%s %s\n", msgi, qup->fsname);
328 printf("\t%s %s\n", msgb, qup->fsname);
332 qup->dqblk.dqb_curblocks == 0 &&
333 qup->dqblk.dqb_curinodes == 0)
337 nam = qup->fsname;
338 if (strlen(qup->fsname) > 15) {
339 printf("%s\n", qup->fsname);
344 prthumanval(7, dbtob(qup->dqblk.dqb_curblocks));
346 prthumanval(7, dbtob(qup->dqblk.dqb_bsoftlimit));
347 prthumanval(7, dbtob(qup->dqblk.dqb_bhardlimit));
350 (uintmax_t)dbtob(qup->dqblk.dqb_curblocks)
353 (uintmax_t)dbtob(qup->dqblk.dqb_bsoftlimit)
355 (uintmax_t)dbtob(qup->dqblk.dqb_bhardlimit)
359 bgrace = timeprt(qup->dqblk.dqb_btime);
361 igrace = timeprt(qup->dqblk.dqb_itime);
364 , (uintmax_t)qup->dqblk.dqb_curinodes
366 , (uintmax_t)qup->dqblk.dqb_isoftlimit
367 , (uintmax_t)qup->dqblk.dqb_ihardlimit
381 showrawquotas(int type, u_long id, struct quotause *qup)
386 type == USRQUOTA ? "user" : "group", id, qup->fsname);
388 (uintmax_t)qup->dqblk.dqb_bhardlimit);
390 (uintmax_t)qup->dqblk.dqb_bsoftlimit);
392 (uintmax_t)qup->dqblk.dqb_curblocks);
394 (uintmax_t)qup->dqblk.dqb_ihardlimit);
396 (uintmax_t)qup->dqblk.dqb_isoftlimit);
398 (uintmax_t)qup->dqblk.dqb_curinodes);
400 (intmax_t)qup->dqblk.dqb_btime);
401 if (qup->dqblk.dqb_btime != 0) {
402 t = qup->dqblk.dqb_btime;
407 printf("i-node grace time: %jd", (intmax_t)qup->dqblk.dqb_itime);
408 if (qup->dqblk.dqb_itime != 0) {
409 t = qup->dqblk.dqb_itime;
480 struct quotause *qup, *quptail = NULL;
487 qup = quphead = (struct quotause *)0;
496 if (qup == NULL) {
497 if ((qup = (struct quotause *)malloc(sizeof *qup))
511 if (getnfsquota(&fst[i], qup, id, quotatype) == 0)
524 if (getufsquota(fs, qup, id, quotatype) == 0)
528 strcpy(qup->fsname, fst[i].f_mntonname);
530 quphead = qup;
532 quptail->next = qup;
533 quptail = qup;
535 qup = NULL;
537 if (qup)
538 free(qup);
547 getufsquota(struct fstab *fs, struct quotause *qup, long id, int quotatype)
553 if (quota_read(qf, &qup->dqblk, id) != 0)
560 getnfsquota(struct statfs *fst, struct quotause *qup, long id, int quotatype)
565 struct dqblk *dqp = &qup->dqblk;