Lines Matching defs:tsp

145     traverse_state_t *tsp, struct fst_node *pnp,
185 traverse_state_t *tsp;
186 tsp = ndmp_malloc(sizeof (traverse_state_t));
187 if (!tsp)
190 tsp->ts_end = strchr(path, '\0');
191 if (*(tsp->ts_end-1) == '/')
192 *--tsp->ts_end = '\0';
193 tsp->ts_ent = NULL;
194 tsp->ts_dpos = 0;
196 return (tsp);
337 traverse_state_t *tsp;
395 tsp = new_tsp(path);
396 if (!tsp) {
402 tsp->ts_ent = tsp->ts_end;
403 tsp->ts_fh = pfh;
404 tsp->ts_st = pst;
406 pn.tn_fh = &tsp->ts_fh;
407 pn.tn_st = &tsp->ts_st;
415 *tsp->ts_end = '\0';
423 rv = fs_readdir(&tsp->ts_fh, pn.tn_path,
424 &tsp->ts_dpos, nm, &el,
433 rv, path, tsp->ts_dpos);
457 tsp->ts_dpos, nm);
476 assert(tsp != NULL);
477 if (cstack_push(sp, tsp, 0)) {
490 * sprintf(tsp->ts_end, "/%s", de->d_name);
498 lp = tsp->ts_end;
499 *tsp->ts_end = '/';
500 (void) strcpy(tsp->ts_end + 1, nm);
502 tsp = new_tsp(path);
503 if (!tsp) {
509 tsp->ts_fh = efh;
510 tsp->ts_st = est;
511 tsp->ts_ent = lp;
512 pn.tn_fh = &tsp->ts_fh;
513 pn.tn_st = &tsp->ts_st;
553 lp = tsp->ts_ent;
555 efh = tsp->ts_fh;
556 est = tsp->ts_st;
557 free(tsp);
558 if (cstack_pop(sp, (void **)&tsp, (int *)NULL))
561 assert(tsp != NULL);
562 pl = tsp->ts_end - path;
566 pl, tsp, path);
571 pn.tn_fh = &tsp->ts_fh;
572 pn.tn_st = &tsp->ts_st;
583 * Does not need to free tsp here. It will be released
588 if (rv != 0 && tsp) {
589 free(tsp->ts_fh.fh_fpath);
590 free(tsp);
614 while (!cstack_pop(sp, (void **)&tsp, (int *)NULL)) {
617 free(tsp->ts_fh.fh_fpath);
618 free(tsp);
640 traverse_state_t *tsp, struct fst_node *pnp, dent_arg_t *darg)
658 fd = open(tsp->ts_fh.fh_fpath, O_RDONLY);
669 rv = fs_getdents(fd, buf, &len, pnp->tn_path, &tsp->ts_dpos,
675 rv, pnp->tn_path, tsp->ts_dpos);
756 traverse_state_t *tsp;
812 tsp = new_tsp(path);
813 if (!tsp) {
824 free(tsp);
830 tsp->ts_ent = tsp->ts_end;
831 tsp->ts_fh = pfh;
832 tsp->ts_st = pst;
834 pn.tn_fh = &tsp->ts_fh;
835 pn.tn_st = &tsp->ts_st;
841 free(tsp);
846 free(tsp);
857 *tsp->ts_end = '\0';
861 rv = traverse_level_nondir(ftp, tsp, &pn, &darg);
864 free(tsp->ts_fh.fh_fpath);
865 free(tsp);
886 tsp->ts_dpos = 0;
892 rv = fs_readdir(&tsp->ts_fh, pn.tn_path,
893 &tsp->ts_dpos, nm, &el, &efh,
900 rv, path, tsp->ts_dpos);
920 tsp->ts_dpos, nm);
969 if (cstack_push(sp, tsp, 0)) {
974 lp = tsp->ts_end;
975 *tsp->ts_end = '/';
976 (void) strcpy(tsp->ts_end + 1, nm);
978 tsp = new_tsp(path);
979 if (!tsp)
984 tsp->ts_fh = efh;
985 tsp->ts_st = est;
986 tsp->ts_ent = lp;
987 pn.tn_fh = &tsp->ts_fh;
988 pn.tn_st = &tsp->ts_st;
1002 if (tsp) {
1003 free(tsp->ts_fh.fh_fpath);
1004 free(tsp);
1011 if (cstack_pop(sp, (void **)&tsp, (int *)NULL))
1020 *tsp->ts_end = '\0';
1021 pl = tsp->ts_end - path;
1022 pn.tn_fh = &tsp->ts_fh;
1023 pn.tn_st = &tsp->ts_st;
1030 while (!cstack_pop(sp, (void **)&tsp, (int *)NULL)) {
1033 free(tsp->ts_fh.fh_fpath);
1034 free(tsp);