Lines Matching defs:qh
49 struct quotahandle *qh;
95 qh = malloc(sizeof(*qh));
96 if (qh == NULL) {
105 qh->qh_mountpoint = strdup(stv.f_mntonname);
106 if (qh->qh_mountpoint == NULL) {
108 free(qh);
113 qh->qh_mountdevice = strdup(stv.f_mntfromname);
114 if (qh->qh_mountdevice == NULL) {
116 free(qh->qh_mountpoint);
117 free(qh);
122 qh->qh_mode = mode;
124 qh->qh_oldfilesopen = 0;
125 qh->qh_userfile = -1;
126 qh->qh_groupfile = -1;
128 return qh;
132 quota_getmountpoint(struct quotahandle *qh)
134 return qh->qh_mountpoint;
138 quota_getmountdevice(struct quotahandle *qh)
140 return qh->qh_mountdevice;
144 quota_close(struct quotahandle *qh)
146 if (qh->qh_userfile >= 0) {
147 close(qh->qh_userfile);
149 if (qh->qh_groupfile >= 0) {
150 close(qh->qh_groupfile);
152 free(qh->qh_mountdevice);
153 free(qh->qh_mountpoint);
154 free(qh);
158 quota_quotaon(struct quotahandle *qh, int idtype)
160 switch (qh->qh_mode) {
165 return __quota_oldfiles_quotaon(qh, idtype);
167 return __quota_kernel_quotaon(qh, idtype);
176 quota_quotaoff(struct quotahandle *qh, int idtype)
178 switch (qh->qh_mode) {
187 return __quota_kernel_quotaoff(qh, idtype);