Lines Matching defs:qup

94 static void showrawquotas(int type, u_long id, struct quotause *qup);
96 static int getufsquota(struct fstab *fs, struct quotause *qup, long id,
98 static int getnfsquota(struct statfs *fst, struct quotause *qup, long id,
279 struct quotause *qup;
290 for (qup = quplist; qup; qup = qup->next) {
292 if (qup->dqblk.dqb_ihardlimit &&
293 qup->dqblk.dqb_curinodes >= qup->dqblk.dqb_ihardlimit) {
297 else if (qup->dqblk.dqb_isoftlimit &&
298 qup->dqblk.dqb_curinodes >= qup->dqblk.dqb_isoftlimit) {
300 if (qup->dqblk.dqb_itime > now)
306 if (qup->dqblk.dqb_bhardlimit &&
307 qup->dqblk.dqb_curblocks >= qup->dqblk.dqb_bhardlimit) {
311 else if (qup->dqblk.dqb_bsoftlimit &&
312 qup->dqblk.dqb_curblocks >= qup->dqblk.dqb_bsoftlimit) {
314 if (qup->dqblk.dqb_btime > now)
320 showrawquotas(type, id, qup);
324 qup->dqblk.dqb_isoftlimit == 0 &&
325 qup->dqblk.dqb_ihardlimit == 0 &&
326 qup->dqblk.dqb_bsoftlimit == 0 &&
327 qup->dqblk.dqb_bhardlimit == 0)
334 printf("\t%s %s\n", msgi, qup->fsname);
336 printf("\t%s %s\n", msgb, qup->fsname);
340 qup->dqblk.dqb_curblocks == 0 &&
341 qup->dqblk.dqb_curinodes == 0)
345 nam = qup->fsname;
346 if (strlen(qup->fsname) > 15) {
347 printf("%s\n", qup->fsname);
352 prthumanval(7, dbtob(qup->dqblk.dqb_curblocks));
354 prthumanval(7, dbtob(qup->dqblk.dqb_bsoftlimit));
355 prthumanval(7, dbtob(qup->dqblk.dqb_bhardlimit));
358 (uintmax_t)dbtob(qup->dqblk.dqb_curblocks)
361 (uintmax_t)dbtob(qup->dqblk.dqb_bsoftlimit)
363 (uintmax_t)dbtob(qup->dqblk.dqb_bhardlimit)
367 bgrace = timeprt(qup->dqblk.dqb_btime);
369 igrace = timeprt(qup->dqblk.dqb_itime);
372 , (uintmax_t)qup->dqblk.dqb_curinodes
374 , (uintmax_t)qup->dqblk.dqb_isoftlimit
375 , (uintmax_t)qup->dqblk.dqb_ihardlimit
389 showrawquotas(int type, u_long id, struct quotause *qup)
394 type == USRQUOTA ? "user" : "group", id, qup->fsname);
396 (uintmax_t)qup->dqblk.dqb_bhardlimit);
398 (uintmax_t)qup->dqblk.dqb_bsoftlimit);
400 (uintmax_t)qup->dqblk.dqb_curblocks);
402 (uintmax_t)qup->dqblk.dqb_ihardlimit);
404 (uintmax_t)qup->dqblk.dqb_isoftlimit);
406 (uintmax_t)qup->dqblk.dqb_curinodes);
408 (intmax_t)qup->dqblk.dqb_btime);
409 if (qup->dqblk.dqb_btime != 0) {
410 t = qup->dqblk.dqb_btime;
415 printf("i-node grace time: %jd", (intmax_t)qup->dqblk.dqb_itime);
416 if (qup->dqblk.dqb_itime != 0) {
417 t = qup->dqblk.dqb_itime;
488 struct quotause *qup, *quptail = NULL;
495 qup = quphead = (struct quotause *)0;
504 if (qup == NULL) {
505 if ((qup = (struct quotause *)malloc(sizeof *qup))
519 if (getnfsquota(&fst[i], qup, id, quotatype) == 0)
532 if (getufsquota(fs, qup, id, quotatype) == 0)
536 strcpy(qup->fsname, fst[i].f_mntonname);
538 quphead = qup;
540 quptail->next = qup;
541 quptail = qup;
543 qup = NULL;
545 if (qup)
546 free(qup);
555 getufsquota(struct fstab *fs, struct quotause *qup, long id, int quotatype)
561 if (quota_read(qf, &qup->dqblk, id) != 0)
568 getnfsquota(struct statfs *fst, struct quotause *qup, long id, int quotatype)
572 struct dqblk *dqp = &qup->dqblk;