Lines Matching refs:lstatp

232 static cfga_err_t list_common(list_stat_t *lstatp, const char *class);
238 const char *class, list_stat_t *lstatp);
254 static cfga_err_t null_stat_plugin(list_stat_t *lstatp, lib_loc_t *libloc_p,
269 int *nlistp, list_stat_t *lstatp);
271 int *nlistp, list_stat_t *lstatp);
274 static void lstat_free(list_stat_t *lstatp);
2312 list_stat_t *lstatp)
2321 assert(*lstatp->countp >= 0);
2323 if (*lstatp->countp == 0) {
2332 if ((cldp = config_calloc_check(*lstatp->countp,
2333 sizeof (cfga_list_data_t), lstatp->errstr)) == NULL) {
2341 slp = lstatp->sdl;
2343 if (i >= *lstatp->countp) {
2354 alp = lstatp->al;
2356 if (i + alp->nelem > *lstatp->countp) {
2367 if (i != *lstatp->countp) {
2377 lstat_free(lstatp);
2381 *nlistp = *lstatp->countp;
2396 realloc_data(cfga_stat_data_t **ap_id_list, int *nlistp, list_stat_t *lstatp)
2404 assert(*lstatp->countp >= 0);
2406 if (*lstatp->countp == 0) {
2416 if ((buf = config_calloc_check(*lstatp->countp,
2417 sizeof (cfga_stat_data_t), lstatp->errstr)) == NULL) {
2429 slp = lstatp->sdl;
2431 if (i >= *lstatp->countp) {
2443 *nlistp = *lstatp->countp;
2455 assert(lstatp->al == NULL);
2456 lstat_free(lstatp);
2466 list_common(list_stat_t *lstatp, const char *class)
2490 config_err(errno, DI_INIT_FAILED, lstatp->errstr);
2495 lstatp, do_list_common_hp);
2504 config_err(errno, DI_INIT_FAILED, lstatp->errstr);
2508 DI_CHECK_ALIAS|DI_CHECK_INTERNAL_PATH, lstatp, do_list_common);
2512 if (lstatp->shp_errstr != NULL) {
2513 *(lstatp->errstr) = strdup(lstatp->shp_errstr);
2514 free(lstatp->shp_errstr);
2515 lstatp->shp_errstr = NULL;
2633 list_stat_t *lstatp = NULL;
2639 lstatp = (list_stat_t *)arg;
2678 if (compat_plugin(&lstatp->use_vers, libp->plugin_vers)) {
2680 (void) libp->vers_ops->stat_plugin(lstatp,
2691 ret = libp->vers_ops->stat_plugin(lstatp,
2692 &lib_loc, lstatp->errstr);
2693 if (ret == CFGA_NOTSUPP && *(lstatp->errstr) != NULL) {
2694 if (lstatp->shp_errstr == NULL) {
2695 lstatp->shp_errstr =
2696 strdup(*(lstatp->errstr));
2700 if (*(lstatp->errstr) != NULL) {
2701 free(*(lstatp->errstr));
2702 *(lstatp->errstr) = NULL;
2719 list_stat_t *lstatp)
2733 lstatp->errstr)) != CFGA_OK) {
2752 rc = libp->vers_ops->stat_plugin(lstatp, &libloc,
2753 lstatp->errstr);
2761 lstat_free(lstatp);
2768 null_stat_plugin(list_stat_t *lstatp, lib_loc_t *libloc_p, char **errstring)
2778 stat_plugin_v1(list_stat_t *lstatp, lib_loc_t *libloc_p, char **errstring)
2796 &slp->stat_data, lstatp->opts, errstring)) != CFGA_OK) {
2817 if ((slp2 = lstatp->sdl) == NULL) {
2818 lstatp->sdl = slp;
2826 (*lstatp->countp)++;
2832 stat_plugin_v2(list_stat_t *lstatp, lib_loc_t *libloc_p, char **errstring)
2855 libloc_p->ap_physical, &alp->array, &alp->nelem, lstatp->opts, NULL,
2856 errstring, lstatp->flags)) != CFGA_OK || alp->nelem <= 0) {
2903 if ((alp2 = lstatp->al) == NULL) {
2904 lstatp->al = alp;
2912 (*lstatp->countp) += alp->nelem;
3180 lstat_free(list_stat_t *lstatp)
3185 slp = lstatp->sdl;
3192 lstatp->sdl = NULL;
3194 ap = lstatp->al;
3202 lstatp->al = NULL;