Lines Matching refs:bufsz
65 ac_state_set(ac_info_t *info, void *buf, size_t bufsz)
69 if (buf == NULL || (bufsz != sizeof (int)))
72 if (copyin(buf, &state, bufsz) != 0)
85 ac_state_get(ac_info_t *info, void *buf, size_t bufsz)
87 if (buf == NULL || (bufsz != sizeof (int)))
91 if (copyout(&info->ac_state, buf, bufsz) != 0) {
147 ac_file_set(ac_info_t *info, void *ubuf, size_t bufsz)
183 if (bufsz < 2 || bufsz > MAXPATHLEN)
190 kbuf = kmem_zalloc(bufsz, KM_SLEEP);
191 if ((error = copyinstr((char *)ubuf, (char *)kbuf, bufsz, NULL)) != 0) {
192 kmem_free(kbuf, bufsz);
196 kmem_free(kbuf, bufsz);
209 kmem_free(kbuf, bufsz);
309 ac_file_get(ac_info_t *info, void *buf, size_t bufsz)
324 if (strlen(file) >= bufsz)
334 ac_res_set(ac_info_t *info, void *buf, size_t bufsz, int maxres)
346 if (bufsz == 0 ||
347 bufsz > sizeof (ac_res_t) * (AC_MAX_RES + 1) ||
348 (bufsz / sizeof (ac_res_t)) * sizeof (ac_res_t) != bufsz)
351 tmp = res = kmem_alloc(bufsz, KM_SLEEP);
352 if (copyin(buf, res, bufsz) != 0) {
353 kmem_free(res, bufsz);
363 kmem_free(res, bufsz);
372 kmem_free(res, bufsz);
379 kmem_free(res, bufsz);
384 ac_res_get(ac_info_t *info, void *buf, size_t bufsz, int maxres)
393 if (bufsz < ressz)
426 acctctl(int cmd, void *buf, size_t bufsz)
481 error = ac_state_set(info, buf, bufsz);
484 error = ac_state_get(info, buf, bufsz);
494 error = ac_file_set(info, buf, bufsz);
497 error = ac_file_get(info, buf, bufsz);
507 error = ac_res_set(info, buf, bufsz, maxres);
510 error = ac_res_get(info, buf, bufsz, maxres);