Lines Matching refs:lstatp
233 static cfga_err_t list_common(list_stat_t *lstatp, const char *class);
239 const char *class, list_stat_t *lstatp);
255 static cfga_err_t null_stat_plugin(list_stat_t *lstatp, lib_loc_t *libloc_p,
270 int *nlistp, list_stat_t *lstatp);
272 int *nlistp, list_stat_t *lstatp);
275 static void lstat_free(list_stat_t *lstatp);
2313 list_stat_t *lstatp) in realloc_data_ext() argument
2322 assert(*lstatp->countp >= 0); in realloc_data_ext()
2324 if (*lstatp->countp == 0) { in realloc_data_ext()
2333 if ((cldp = config_calloc_check(*lstatp->countp, in realloc_data_ext()
2334 sizeof (cfga_list_data_t), lstatp->errstr)) == NULL) { in realloc_data_ext()
2342 slp = lstatp->sdl; in realloc_data_ext()
2344 if (i >= *lstatp->countp) { in realloc_data_ext()
2355 alp = lstatp->al; in realloc_data_ext()
2357 if (i + alp->nelem > *lstatp->countp) { in realloc_data_ext()
2368 if (i != *lstatp->countp) { in realloc_data_ext()
2378 lstat_free(lstatp); in realloc_data_ext()
2382 *nlistp = *lstatp->countp; in realloc_data_ext()
2397 realloc_data(cfga_stat_data_t **ap_id_list, int *nlistp, list_stat_t *lstatp) in realloc_data() argument
2405 assert(*lstatp->countp >= 0); in realloc_data()
2407 if (*lstatp->countp == 0) { in realloc_data()
2417 if ((buf = config_calloc_check(*lstatp->countp, in realloc_data()
2418 sizeof (cfga_stat_data_t), lstatp->errstr)) == NULL) { in realloc_data()
2430 slp = lstatp->sdl; in realloc_data()
2432 if (i >= *lstatp->countp) { in realloc_data()
2444 *nlistp = *lstatp->countp; in realloc_data()
2456 assert(lstatp->al == NULL); in realloc_data()
2457 lstat_free(lstatp); in realloc_data()
2467 list_common(list_stat_t *lstatp, const char *class) in list_common() argument
2491 config_err(errno, DI_INIT_FAILED, lstatp->errstr); in list_common()
2496 lstatp, do_list_common_hp); in list_common()
2505 config_err(errno, DI_INIT_FAILED, lstatp->errstr); in list_common()
2509 DI_CHECK_ALIAS|DI_CHECK_INTERNAL_PATH, lstatp, do_list_common); in list_common()
2513 if (lstatp->shp_errstr != NULL) { in list_common()
2514 *(lstatp->errstr) = strdup(lstatp->shp_errstr); in list_common()
2515 free(lstatp->shp_errstr); in list_common()
2516 lstatp->shp_errstr = NULL; in list_common()
2634 list_stat_t *lstatp = NULL; in do_list_common_impl() local
2640 lstatp = (list_stat_t *)arg; in do_list_common_impl()
2679 if (compat_plugin(&lstatp->use_vers, libp->plugin_vers)) { in do_list_common_impl()
2681 (void) libp->vers_ops->stat_plugin(lstatp, in do_list_common_impl()
2692 ret = libp->vers_ops->stat_plugin(lstatp, in do_list_common_impl()
2693 &lib_loc, lstatp->errstr); in do_list_common_impl()
2694 if (ret == CFGA_NOTSUPP && *(lstatp->errstr) != NULL) { in do_list_common_impl()
2695 if (lstatp->shp_errstr == NULL) { in do_list_common_impl()
2696 lstatp->shp_errstr = in do_list_common_impl()
2697 strdup(*(lstatp->errstr)); in do_list_common_impl()
2701 if (*(lstatp->errstr) != NULL) { in do_list_common_impl()
2702 free(*(lstatp->errstr)); in do_list_common_impl()
2703 *(lstatp->errstr) = NULL; in do_list_common_impl()
2720 list_stat_t *lstatp) in stat_common() argument
2734 lstatp->errstr)) != CFGA_OK) { in stat_common()
2753 rc = libp->vers_ops->stat_plugin(lstatp, &libloc, in stat_common()
2754 lstatp->errstr); in stat_common()
2762 lstat_free(lstatp); in stat_common()
2769 null_stat_plugin(list_stat_t *lstatp, lib_loc_t *libloc_p, char **errstring) in null_stat_plugin() argument
2779 stat_plugin_v1(list_stat_t *lstatp, lib_loc_t *libloc_p, char **errstring) in stat_plugin_v1() argument
2797 &slp->stat_data, lstatp->opts, errstring)) != CFGA_OK) { in stat_plugin_v1()
2818 if ((slp2 = lstatp->sdl) == NULL) { in stat_plugin_v1()
2819 lstatp->sdl = slp; in stat_plugin_v1()
2827 (*lstatp->countp)++; in stat_plugin_v1()
2833 stat_plugin_v2(list_stat_t *lstatp, lib_loc_t *libloc_p, char **errstring) in stat_plugin_v2() argument
2856 libloc_p->ap_physical, &alp->array, &alp->nelem, lstatp->opts, NULL, in stat_plugin_v2()
2857 errstring, lstatp->flags)) != CFGA_OK || alp->nelem <= 0) { in stat_plugin_v2()
2904 if ((alp2 = lstatp->al) == NULL) { in stat_plugin_v2()
2905 lstatp->al = alp; in stat_plugin_v2()
2913 (*lstatp->countp) += alp->nelem; in stat_plugin_v2()
3181 lstat_free(list_stat_t *lstatp) in lstat_free() argument
3186 slp = lstatp->sdl; in lstat_free()
3193 lstatp->sdl = NULL; in lstat_free()
3195 ap = lstatp->al; in lstat_free()
3203 lstatp->al = NULL; in lstat_free()