Lines Matching refs:dir
180 struct autodir *dir;
193 pr_msg("dir %s must start with '/'", mntpnt);
222 dir = (struct autodir *)malloc(sizeof (*dir));
223 if (dir == NULL)
225 dir->dir_name = strdup(mntpnt);
226 if (dir->dir_name == NULL)
228 dir->dir_map = strdup(map);
229 if (dir->dir_map == NULL)
231 dir->dir_opts = strdup(opts);
232 if (dir->dir_opts == NULL)
234 dir->dir_direct = direct;
235 dir->dir_remount = 0;
236 dir->dir_next = NULL;
239 * Append to dir chain
242 dir_head = dir;
244 dir_tail->dir_next = dir;
246 dir->dir_prev = dir_tail;
247 dir_tail = dir;
252 if (dir != NULL) {
253 if (dir->dir_opts)
254 free(dir->dir_opts);
255 if (dir->dir_map)
256 free(dir->dir_map);
257 if (dir->dir_name)
258 free(dir->dir_name);
259 free(dir);
274 register struct autodir *dir;
277 for (dir = dir_head; dir; dir = dir->dir_next) {
278 p = dir->dir_name;
284 return (dir->dir_name);
286 return (dir->dir_name);