Home | History | Annotate | Download | only in libquota

Lines Matching defs:qc

43 	struct quotacursor *qc;
76 qc = malloc(sizeof(*qc));
77 if (qc == NULL) {
81 qc->qc_qh = qh;
84 qc->qc_type = QC_OLDFILES;
85 qc->u.qc_oldfiles = __quota_oldfiles_cursor_create(qh);
86 if (qc->u.qc_oldfiles == NULL) {
88 free(qc);
93 qc->qc_type = QC_KERNEL;
94 qc->u.qc_kernel = __quota_kernel_cursor_create(qh);
95 if (qc->u.qc_kernel == NULL) {
97 free(qc);
102 return qc;
106 quotacursor_close(struct quotacursor *qc)
108 switch (qc->qc_type) {
110 __quota_oldfiles_cursor_destroy(qc->u.qc_oldfiles);
113 __quota_kernel_cursor_destroy(qc->qc_qh, qc->u.qc_kernel);
116 free(qc);
120 quotacursor_skipidtype(struct quotacursor *qc, int idtype)
122 switch (qc->qc_type) {
124 return __quota_oldfiles_cursor_skipidtype(qc->u.qc_oldfiles,
127 return __quota_kernel_cursor_skipidtype(qc->qc_qh,
128 qc->u.qc_kernel,
136 quotacursor_get(struct quotacursor *qc,
139 switch (qc->qc_type) {
141 return __quota_oldfiles_cursor_get(qc->qc_qh,
142 qc->u.qc_oldfiles,
145 return __quota_kernel_cursor_get(qc->qc_qh, qc->u.qc_kernel,
153 quotacursor_getn(struct quotacursor *qc,
157 switch (qc->qc_type) {
159 return __quota_oldfiles_cursor_getn(qc->qc_qh,
160 qc->u.qc_oldfiles,
163 return __quota_kernel_cursor_getn(qc->qc_qh, qc->u.qc_kernel,
171 quotacursor_atend(struct quotacursor *qc)
173 switch (qc->qc_type) {
175 return __quota_oldfiles_cursor_atend(qc->u.qc_oldfiles);
178 return __quota_kernel_cursor_atend(qc->qc_qh, qc->u.qc_kernel);
185 quotacursor_rewind(struct quotacursor *qc)
187 switch (qc->qc_type) {
189 return __quota_oldfiles_cursor_rewind(qc->u.qc_oldfiles);
191 return __quota_kernel_cursor_rewind(qc->qc_qh,qc->u.qc_kernel);