Lines Matching refs:path

60 static int	ask_basedir(char *path, int nointeract);
61 static char *expand_path(char *path);
63 static char *fixpath_dup(char *path);
123 set_inst_root(char *path) in set_inst_root() argument
134 if (strcmp(install_root, path)) in set_inst_root()
137 ptext(stderr, gettext(ERR_IRSET), path); in set_inst_root()
140 ptext(stderr, gettext(MSG_IR_REPL), path); in set_inst_root()
145 if (path && *path) { in set_inst_root()
146 if (*path != '/') { in set_inst_root()
147 ptext(stderr, gettext(ERR_IRNOTABS), path); in set_inst_root()
151 (void) strlcpy(tmp_path, path, sizeof (tmp_path)); in set_inst_root()
178 fixpath(char *path) in fixpath() argument
183 if (path && *path) { in fixpath()
186 calloc(1, strlen(path) + install_root_len + in fixpath()
207 if (strcmp(path, "/")) in fixpath()
208 (void) strcpy(npath_ptr, path); in fixpath()
214 npath = strdup(path); in fixpath()
235 fixpath_dup(char *path) in fixpath_dup() argument
240 if (path && *path) { in fixpath_dup()
242 npath = pathalloc(strlen(path) + install_root_len + 1); in fixpath_dup()
259 if (strcmp(path, "/")) in fixpath_dup()
260 (void) strcpy(npath_ptr, path); in fixpath_dup()
266 npath = pathdup(path); in fixpath_dup()
305 orig_path_ptr(char *path) in orig_path_ptr() argument
309 if (path && *path) { /* as long as we got an argument */ in orig_path_ptr()
311 retv = path; /* path unchanged */ in orig_path_ptr()
317 else if (strncmp(path, install_root, install_root_len) == 0) { in orig_path_ptr()
318 retv = path + install_root_len; in orig_path_ptr()
337 retv = path; /* All else failing, return path. */ in orig_path_ptr()
351 orig_path(char *path) in orig_path() argument
355 retv = orig_path_ptr(path); in orig_path()
379 ask_basedir(char *path, int nointeract) in ask_basedir() argument
387 path[0] = '\0'; in ask_basedir()
388 if (n = ckpath(path, P_ABSOLUTE|P_DIR|P_WRITE, in ask_basedir()
393 expand_path(path); in ask_basedir()
406 char path[PATH_MAX]; in set_basedirs() local
445 if (n = ask_basedir(path, nointeract)) in set_basedirs()
488 else if (n = ask_basedir(path, nointeract)) in set_basedirs()
678 expand_path(char *path) in expand_path() argument
682 if (!path || !*path) in expand_path()
683 return (path); in expand_path()
685 (void) strlcpy(path_buf, path, sizeof (path_buf)); in expand_path()
794 eval_path(char **server_ptr, char **client_ptr, char **map_ptr, char *path) in eval_path() argument
832 if (RELATIVE(path)) { in eval_path()
838 path_size = orig_offset_rel + strlen(path); in eval_path()
850 rel_fmt[base_sepr], basedir, path); in eval_path()
852 ptext(stderr, gettext(ERR_RELINABS), path); in eval_path()
856 *server_ptr = fixpath_dup(path); in eval_path()