Lines Matching refs:lstatp
236 static cfga_err_t list_common(list_stat_t *lstatp, const char *class);
242 const char *class, list_stat_t *lstatp);
258 static cfga_err_t null_stat_plugin(list_stat_t *lstatp, lib_loc_t *libloc_p,
273 int *nlistp, list_stat_t *lstatp);
275 int *nlistp, list_stat_t *lstatp);
278 static void lstat_free(list_stat_t *lstatp);
2319 list_stat_t *lstatp) in realloc_data_ext() argument
2328 assert(*lstatp->countp >= 0); in realloc_data_ext()
2330 if (*lstatp->countp == 0) { in realloc_data_ext()
2339 if ((cldp = config_calloc_check(*lstatp->countp, in realloc_data_ext()
2340 sizeof (cfga_list_data_t), lstatp->errstr)) == NULL) { in realloc_data_ext()
2348 slp = lstatp->sdl; in realloc_data_ext()
2350 if (i >= *lstatp->countp) { in realloc_data_ext()
2361 alp = lstatp->al; in realloc_data_ext()
2363 if (i + alp->nelem > *lstatp->countp) { in realloc_data_ext()
2374 if (i != *lstatp->countp) { in realloc_data_ext()
2384 lstat_free(lstatp); in realloc_data_ext()
2388 *nlistp = *lstatp->countp; in realloc_data_ext()
2403 realloc_data(cfga_stat_data_t **ap_id_list, int *nlistp, list_stat_t *lstatp) in realloc_data() argument
2411 assert(*lstatp->countp >= 0); in realloc_data()
2413 if (*lstatp->countp == 0) { in realloc_data()
2423 if ((buf = config_calloc_check(*lstatp->countp, in realloc_data()
2424 sizeof (cfga_stat_data_t), lstatp->errstr)) == NULL) { in realloc_data()
2436 slp = lstatp->sdl; in realloc_data()
2438 if (i >= *lstatp->countp) { in realloc_data()
2450 *nlistp = *lstatp->countp; in realloc_data()
2462 assert(lstatp->al == NULL); in realloc_data()
2463 lstat_free(lstatp); in realloc_data()
2473 list_common(list_stat_t *lstatp, const char *class) in list_common() argument
2497 config_err(errno, DI_INIT_FAILED, lstatp->errstr); in list_common()
2502 lstatp, do_list_common_hp); in list_common()
2511 config_err(errno, DI_INIT_FAILED, lstatp->errstr); in list_common()
2515 DI_CHECK_ALIAS|DI_CHECK_INTERNAL_PATH, lstatp, do_list_common); in list_common()
2519 if (lstatp->shp_errstr != NULL) { in list_common()
2520 *(lstatp->errstr) = strdup(lstatp->shp_errstr); in list_common()
2521 free(lstatp->shp_errstr); in list_common()
2522 lstatp->shp_errstr = NULL; in list_common()
2625 list_stat_t *lstatp = NULL; in do_list_common_impl() local
2631 lstatp = (list_stat_t *)arg; in do_list_common_impl()
2670 if (compat_plugin(&lstatp->use_vers, libp->plugin_vers)) { in do_list_common_impl()
2672 (void) libp->vers_ops->stat_plugin(lstatp, in do_list_common_impl()
2683 ret = libp->vers_ops->stat_plugin(lstatp, in do_list_common_impl()
2684 &lib_loc, lstatp->errstr); in do_list_common_impl()
2685 if (ret == CFGA_NOTSUPP && *(lstatp->errstr) != NULL) { in do_list_common_impl()
2686 if (lstatp->shp_errstr == NULL) { in do_list_common_impl()
2687 lstatp->shp_errstr = in do_list_common_impl()
2688 strdup(*(lstatp->errstr)); in do_list_common_impl()
2692 if (*(lstatp->errstr) != NULL) { in do_list_common_impl()
2693 free(*(lstatp->errstr)); in do_list_common_impl()
2694 *(lstatp->errstr) = NULL; in do_list_common_impl()
2711 list_stat_t *lstatp) in stat_common() argument
2725 lstatp->errstr)) != CFGA_OK) { in stat_common()
2744 rc = libp->vers_ops->stat_plugin(lstatp, &libloc, in stat_common()
2745 lstatp->errstr); in stat_common()
2753 lstat_free(lstatp); in stat_common()
2760 null_stat_plugin(list_stat_t *lstatp, lib_loc_t *libloc_p, char **errstring) in null_stat_plugin() argument
2770 stat_plugin_v1(list_stat_t *lstatp, lib_loc_t *libloc_p, char **errstring) in stat_plugin_v1() argument
2788 &slp->stat_data, lstatp->opts, errstring)) != CFGA_OK) { in stat_plugin_v1()
2809 if ((slp2 = lstatp->sdl) == NULL) { in stat_plugin_v1()
2810 lstatp->sdl = slp; in stat_plugin_v1()
2818 (*lstatp->countp)++; in stat_plugin_v1()
2824 stat_plugin_v2(list_stat_t *lstatp, lib_loc_t *libloc_p, char **errstring) in stat_plugin_v2() argument
2847 libloc_p->ap_physical, &alp->array, &alp->nelem, lstatp->opts, NULL, in stat_plugin_v2()
2848 errstring, lstatp->flags)) != CFGA_OK || alp->nelem <= 0) { in stat_plugin_v2()
2895 if ((alp2 = lstatp->al) == NULL) { in stat_plugin_v2()
2896 lstatp->al = alp; in stat_plugin_v2()
2904 (*lstatp->countp) += alp->nelem; in stat_plugin_v2()
3172 lstat_free(list_stat_t *lstatp) in lstat_free() argument
3177 slp = lstatp->sdl; in lstat_free()
3184 lstatp->sdl = NULL; in lstat_free()
3186 ap = lstatp->al; in lstat_free()
3194 lstatp->al = NULL; in lstat_free()