Lines Matching defs:qh

251 __quota_oldfiles_defquotafile(struct quotahandle *qh, int idtype,
257 qh->qh_mountpoint,
262 __quota_oldfiles_getquotafile(struct quotahandle *qh, int idtype,
268 ofe = __quota_oldfiles_find_fstabentry(qh->qh_mountpoint);
295 __quota_oldfiles_defquotafile(qh, idtype, buf, maxlen);
362 __quota_oldfiles_open(struct quotahandle *qh, const char *path, int *fd_ret)
378 __quota_oldfiles_initialize(struct quotahandle *qh)
384 if (qh->qh_oldfilesopen) {
392 ofe = __quota_oldfiles_find_fstabentry(qh->qh_mountpoint);
394 warnx("%s not found in fstab", qh->qh_mountpoint);
407 __quota_oldfiles_defquotafile(qh, USRQUOTA,
411 if (__quota_oldfiles_open(qh, userquotafile,
412 &qh->qh_userfile)) {
419 __quota_oldfiles_defquotafile(qh, GRPQUOTA,
423 if (__quota_oldfiles_open(qh, groupquotafile,
424 &qh->qh_groupfile)) {
429 qh->qh_oldfilesopen = 1;
435 __quota_oldfiles_getimplname(struct quotahandle *qh)
441 __quota_oldfiles_quotaon(struct quotahandle *qh, int idtype)
449 if (qh->qh_oldfilesopen) {
450 if (qh->qh_userfile >= 0) {
451 close(qh->qh_userfile);
452 qh->qh_userfile = -1;
454 if (qh->qh_groupfile >= 0) {
455 close(qh->qh_groupfile);
456 qh->qh_groupfile = -1;
458 qh->qh_oldfilesopen = 0;
465 result = __quota_kernel_quotaon(qh, idtype);
475 qh->qh_mode = QUOTA_MODE_KERNEL;
480 __quota_oldfiles_doget(struct quotahandle *qh, const struct quotakey *qk,
488 if (!qh->qh_oldfilesopen) {
489 if (__quota_oldfiles_initialize(qh)) {
496 file = qh->qh_userfile;
499 file = qh->qh_groupfile;
566 __quota_oldfiles_doput(struct quotahandle *qh, const struct quotakey *qk,
575 if (!qh->qh_oldfilesopen) {
576 if (__quota_oldfiles_initialize(qh)) {
583 file = qh->qh_userfile;
586 file = qh->qh_groupfile;
678 __quota_oldfiles_get(struct quotahandle *qh, const struct quotakey *qk,
681 return __quota_oldfiles_doget(qh, qk, qv, NULL);
685 __quota_oldfiles_put(struct quotahandle *qh, const struct quotakey *qk,
688 return __quota_oldfiles_doput(qh, qk, qv);
692 __quota_oldfiles_delete(struct quotahandle *qh, const struct quotakey *qk)
697 return __quota_oldfiles_doput(qh, qk, &qv);
701 __quota_oldfiles_cursor_create(struct quotahandle *qh)
720 if (qh->qh_userfile >= 0) {
727 if (qh->qh_groupfile >= 0) {
734 if (fstat(qh->qh_userfile, &st) < 0) {
742 if (fstat(qh->qh_groupfile, &st) < 0) {
780 __quota_oldfiles_cursor_get(struct quotahandle *qh,
827 if (__quota_oldfiles_doget(qh, key, val, &isallzero)) {
870 __quota_oldfiles_cursor_getn(struct quotahandle *qh,
887 if (__quota_oldfiles_cursor_get(qh, oqc, &keys[i], &vals[i])) {