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