Lines Matching refs:handle
102 struct finddevhdl *handle;
112 handle = calloc(1, sizeof (struct finddevhdl));
113 if (handle == NULL) {
118 handle->npaths = 0;
119 handle->curpath = 0;
120 handle->paths = NULL;
131 handle->npaths = n;
132 handle->paths = calloc(n, sizeof (char *));
133 if (handle->paths == NULL) {
134 free(handle);
145 if (n == handle->npaths) {
150 finddev_close((finddevhdl_t)handle);
153 handle->paths[n] = strdup(dp->d_name);
154 if (handle->paths[n] == NULL) {
156 finddev_close((finddevhdl_t)handle);
162 *handlep = (finddevhdl_t)handle;
180 struct finddevhdl *handle;
189 handle = calloc(1, sizeof (struct finddevhdl));
190 if (handle == NULL)
193 handle->npaths = 0;
194 handle->curpath = 0;
195 handle->paths = NULL;
199 free(handle);
206 free(handle);
217 handle->npaths = n;
218 handle->paths = calloc(n, sizeof (char *));
219 if (handle->paths == NULL) {
220 free(handle);
226 handle->paths[n] = strdup(p);
227 if (handle->paths[n] == NULL) {
228 finddev_close((finddevhdl_t)handle);
233 *handlep = (finddevhdl_t)handle;
243 free(handle);
321 struct finddevhdl *handle = (struct finddevhdl *)arg;
324 for (i = 0; i < handle->npaths; i++) {
325 if (handle->paths[i])
326 free(handle->paths[i]);
328 free(handle->paths);
329 free(handle);
335 struct finddevhdl *handle = (struct finddevhdl *)arg;
338 if (handle->curpath < handle->npaths) {
339 path = handle->paths[handle->curpath];
340 handle->curpath++;