Lines Matching refs:path
59 char *buf, *path; in command_ls() local
84 path = ""; in command_ls()
86 path = argv[1]; in command_ls()
89 fd = ls_getdir(&path); in command_ls()
95 pager_output(path); in command_ls()
103 buf = malloc(strlen(path) + strlen(d->d_name) + 2); in command_ls()
104 if (strlen(path) == 0) in command_ls()
107 sprintf(buf, "%s/%s", path, d->d_name); in command_ls()
125 if (path != NULL) in command_ls()
126 free(path); in command_ls()
140 char *path; in ls_getdir() local
145 path = malloc(strlen(*pathp) + 2); in ls_getdir()
146 strcpy(path, *pathp); in ls_getdir()
149 if (archsw.arch_getdev(NULL, path, &cp)) { in ls_getdir()
151 "bad path '%s'", path); in ls_getdir()
158 "open '%s' failed: %s", path, strerror(errno)); in ls_getdir()
168 "%s: %s", path, strerror(ENOTDIR)); in ls_getdir()
172 *pathp = path; in ls_getdir()
176 free(path); in ls_getdir()