Home
last modified time | relevance | path

Searched refs:pathbuf (Results 1 – 25 of 35) sorted by relevance

12

/trueos/sbin/kldconfig/
HDkldconfig.c153 char pathbuf[MAXPATHLEN+1]; in addpath() local
162 if (realpath(path, pathbuf) == NULL) in addpath()
163 strlcpy(pathbuf, path, sizeof(pathbuf)); in addpath()
165 len = strlen(pathbuf); in addpath()
168 if ((len == 0) || (pathbuf[len-1] != '/')) { in addpath()
169 if (len == sizeof(pathbuf) - 1) in addpath()
170 errx(1, "path too long: %s", pathbuf); in addpath()
171 pathbuf[len] = '/'; in addpath()
175 if ((len > 0) && (pathbuf[len-1] == '/')) in addpath()
176 pathbuf[--len] = '\0'; in addpath()
[all …]
/trueos/contrib/tcsh/
HDglob.c459 struct strbuf pathbuf = strbuf_INIT; in glob1() local
467 err = glob2(&pathbuf, pattern, pglob, no_match); in glob1()
468 xfree(pathbuf.s); in glob1()
478 glob2(struct strbuf *pathbuf, const Char *pattern, glob_t *pglob, int no_match) in glob2() argument
492 strbuf_terminate(pathbuf); in glob2()
494 if (Lstat(pathbuf->s, &sbuf)) in glob2()
498 pathbuf->s[pathbuf->len - 1] != SEP) && in glob2()
502 (Stat(pathbuf->s, &sbuf) == 0) && in glob2()
506 strbuf_append1(pathbuf, SEP); in glob2()
507 strbuf_terminate(pathbuf); in glob2()
[all …]
HDtc.os.c1222 char pathbuf[MAXPATHLEN]; /* temporary pathname buffer */ in xgetcwd() local
1223 char *pnptr = &pathbuf[(sizeof pathbuf)-1]; /* pathname pointer */ in xgetcwd()
1273 pnptr = strnrcpy(dirp->d_name, pnptr, pnptr - pathbuf); in xgetcwd()
1274 pnptr = strnrcpy("/", pnptr, pnptr - pathbuf); in xgetcwd()
1293 (void) chdir(strnrcpy(".", pnptr, pnptr - pathbuf)); in xgetcwd()
1308 char pathbuf[MAXPATHLEN], nextpathbuf[MAXPATHLEN * 2]; in xgetcwd() local
1319 pathbuf[MAXPATHLEN - 1] = '\0'; in xgetcwd()
1320 pathptr = &pathbuf[MAXPATHLEN - 1]; in xgetcwd()
1408 pathptr = strnrcpy(pathptr, d->d_name, pathptr - pathbuf); in xgetcwd()
1409 pathptr = strnrcpy(pathptr, "/", pathptr - pathbuf); in xgetcwd()
/trueos/contrib/openpam/lib/libpam/
HDopenpam_check_owner_perms.c104 char pathbuf[PATH_MAX]; in openpam_check_path_owner_perms() local
111 if (realpath(path, pathbuf) == NULL) in openpam_check_path_owner_perms()
113 len = strlen(pathbuf); in openpam_check_path_owner_perms()
115 if (stat(pathbuf, &sb) != 0) { in openpam_check_path_owner_perms()
118 openpam_log(PAM_LOG_ERROR, "%s: %m", pathbuf); in openpam_check_path_owner_perms()
125 "%s: not a regular file", pathbuf); in openpam_check_path_owner_perms()
132 "%s: insecure ownership or permissions", pathbuf); in openpam_check_path_owner_perms()
136 while (--len > 0 && pathbuf[len] != '/') in openpam_check_path_owner_perms()
137 pathbuf[len] = '\0'; in openpam_check_path_owner_perms()
/trueos/lib/ncurses/ncurses/
HDtermcap.c108 char pathbuf[PBUFSIZ]; /* holds raw path of filenames */ in _nc_read_termcap_entry() local
117 p = pathbuf; in _nc_read_termcap_entry()
131 strncpy(pathbuf, termpath, PBUFSIZ); in _nc_read_termcap_entry()
134 strncpy(pathbuf, home, PBUFSIZ - 1); /* $HOME first */ in _nc_read_termcap_entry()
135 pathbuf[PBUFSIZ - 2] = '\0'; /* -2 because we add a slash */ in _nc_read_termcap_entry()
136 p += strlen(pathbuf); /* path, looking in */ in _nc_read_termcap_entry()
139 strncpy(p, _PATH_DEF, PBUFSIZ - (p - pathbuf)); in _nc_read_termcap_entry()
143 strncpy(pathbuf, cp, PBUFSIZ); /* still can be tokenized */ in _nc_read_termcap_entry()
147 strcpy(pathbuf, _PATH_DEF_SEC); in _nc_read_termcap_entry()
149 pathbuf[PBUFSIZ - 1] = '\0'; in _nc_read_termcap_entry()
[all …]
/trueos/bin/ln/
HDln.c184 char pathbuf[PATH_MAX]; in samedirent() local
204 memcpy(pathbuf, ".", 2); in samedirent()
206 memcpy(pathbuf, path1, file1 - path1); in samedirent()
207 pathbuf[file1 - path1] = '\0'; in samedirent()
209 if (stat(pathbuf, &sb1) != 0) in samedirent()
212 memcpy(pathbuf, ".", 2); in samedirent()
214 memcpy(pathbuf, path2, file2 - path2); in samedirent()
215 pathbuf[file2 - path2] = '\0'; in samedirent()
217 if (stat(pathbuf, &sb2) != 0) in samedirent()
/trueos/usr.sbin/pw/
HDgrupd.c64 static char pathbuf[MAXPATHLEN]; in getgrpath() local
66 snprintf(pathbuf, sizeof pathbuf, "%s/%s", grpath, file); in getgrpath()
67 return pathbuf; in getgrpath()
HDpwupd.c66 static char pathbuf[MAXPATHLEN]; in getpwpath() local
68 snprintf(pathbuf, sizeof pathbuf, "%s/%s", pwpath, file); in getpwpath()
69 return pathbuf; in getpwpath()
/trueos/crypto/heimdal/lib/roken/
HDglob.c496 Char pathbuf[MaxPathLen+1]; in glob1() local
501 return(glob2(pathbuf, pathbuf, pattern, pglob, limit)); in glob1()
519 glob2(Char *pathbuf, Char *pathend, Char *pattern, glob_t *pglob, in glob2() argument
533 if (g_lstat(pathbuf, &sb, pglob)) in glob2()
539 (g_stat(pathbuf, &sb, pglob) == 0) && in glob2()
545 return(globextend(pathbuf, pglob, limit)); in glob2()
563 return(glob3(pathbuf, pathend, pattern, p, pglob, in glob2()
570 glob3(Char *pathbuf, Char *pathend, Char *pattern, Char *restpattern, in glob3() argument
589 if ((dirp = g_opendir(pathbuf, pglob)) == NULL) { in glob3()
592 g_Ctoc(pathbuf, buf); in glob3()
[all …]
/trueos/lib/libc/gen/
HDglob.c562 Char pathbuf[MAXPATHLEN]; in glob1() local
567 return (glob2(pathbuf, pathbuf, pathbuf + MAXPATHLEN - 1, in glob1()
577 glob2(Char *pathbuf, Char *pathend, Char *pathend_last, Char *pattern, in glob2() argument
591 if (g_lstat(pathbuf, &sb, pglob)) in glob2()
606 (g_stat(pathbuf, &sb, pglob) == 0) && in glob2()
614 return (globextend(pathbuf, pglob, limit)); in glob2()
637 return (glob3(pathbuf, pathend, pathend_last, pattern, in glob2()
644 glob3(Char *pathbuf, Char *pathend, Char *pathend_last, in glob3() argument
666 if ((dirp = g_opendir(pathbuf, pglob)) == NULL) { in glob3()
669 if (g_Ctoc(pathbuf, buf, sizeof(buf))) in glob3()
[all …]
/trueos/usr.bin/mail/
HDfio.c66 char linebuf[LINESIZE], pathbuf[PATHSIZE]; in setptr() local
70 (void)snprintf(pathbuf, sizeof(pathbuf), "%s/mail.XXXXXXXXXX", tmpdir); in setptr()
71 if ((c = mkstemp(pathbuf)) == -1 || (mestmp = Fdopen(c, "r+")) == NULL) in setptr()
72 err(1, "can't open %s", pathbuf); in setptr()
73 (void)rm(pathbuf); in setptr()
/trueos/crypto/openssh/openbsd-compat/
HDglob.c611 Char pathbuf[MAXPATHLEN]; local
616 return(glob2(pathbuf, pathbuf+MAXPATHLEN-1,
617 pathbuf, pathbuf+MAXPATHLEN-1,
627 glob2(Char *pathbuf, Char *pathbuf_last, Char *pathend, Char *pathend_last, argument
641 if (g_lstat(pathbuf, &sb, pglob))
655 (g_stat(pathbuf, &sb, pglob) == 0) &&
663 return(globextend(pathbuf, pglob, limitp, &sb));
687 return(glob3(pathbuf, pathbuf_last, pathend,
695 glob3(Char *pathbuf, Char *pathbuf_last, Char *pathend, Char *pathend_last, argument
717 if ((dirp = g_opendir(pathbuf, pglob)) == NULL) {
[all …]
/trueos/sbin/fsck_ffs/
HDpass2.c68 char pathbuf[MAXPATHLEN + 1]; in pass2() local
162 getpathname(pathbuf, inp->i_number, inp->i_number); in pass2()
165 "DIRECTORY", pathbuf, in pass2()
169 "DIRECTORY", pathbuf, in pass2()
225 getpathname(pathbuf, inp->i_parent, inp->i_number); in pass2()
227 (uintmax_t)inp->i_number, pathbuf); in pass2()
228 getpathname(pathbuf, inp->i_dotdot, inp->i_dotdot); in pass2()
230 (uintmax_t)inp->i_dotdot, pathbuf); in pass2()
231 getpathname(pathbuf, inp->i_parent, inp->i_parent); in pass2()
233 (uintmax_t)inp->i_parent, pathbuf); in pass2()
HDinode.c65 char pathbuf[MAXPATHLEN + 1]; in ckinode() local
92 getpathname(pathbuf, idesc->id_number, in ckinode()
95 pathbuf); in ckinode()
131 getpathname(pathbuf, idesc->id_number, in ckinode()
134 pathbuf); in ckinode()
160 char pathbuf[MAXPATHLEN + 1]; in iblock() local
210 getpathname(pathbuf, idesc->id_number, in iblock()
213 pathbuf); in iblock()
HDdir.c251 char pathbuf[MAXPATHLEN + 1]; in fileerror() local
256 getpathname(pathbuf, cwd, ino); in fileerror()
258 pfatal("NAME=%s\n", pathbuf); in fileerror()
265 pathbuf); in fileerror()
267 pfatal("NAME=%s\n", pathbuf); in fileerror()
519 char pathbuf[MAXPATHLEN + 1]; in makeentry() local
538 getpathname(pathbuf, parent, parent); in makeentry()
540 if (expanddir(dp, pathbuf) == 0) in makeentry()
/trueos/contrib/sendmail/smrsh/
HDsmrsh.c151 char pathbuf[1000]; local
163 (void) sm_strlcpyn(pathbuf, sizeof pathbuf, 2, "PATH=", PATH);
164 newenv[0] = pathbuf;
/trueos/contrib/ncurses/ncurses/tinfo/
HDread_termcap.c778 char pathbuf[PBUFSIZ]; /* holds raw path of filenames */ in _nc_tgetent() local
787 p = pathbuf; in _nc_tgetent()
799 _nc_str_init(&desc, pathbuf, sizeof(pathbuf)); in _nc_tgetent()
823 *fname++ = pathbuf; /* tokenize path into vector of names */ in _nc_tgetent()
1014 char pathbuf[PATH_MAX]; in _nc_read_termcap_entry() local
1049 (void) sprintf(pathbuf, PRIVATE_CAP, envhome); in _nc_read_termcap_entry()
1050 ADD_TC(pathbuf, filecount); in _nc_read_termcap_entry()
/trueos/sys/kern/
HDvfs_mount.c1037 char *pathbuf; in vfs_domount() local
1099 pathbuf = malloc(MNAMELEN, M_TEMP, M_WAITOK); in vfs_domount()
1100 strcpy(pathbuf, fspath); in vfs_domount()
1101 error = vn_path_to_global_path(td, vp, pathbuf, MNAMELEN); in vfs_domount()
1104 error = vfs_domount_first(td, vfsp, pathbuf, vp, in vfs_domount()
1107 free(pathbuf, M_TEMP); in vfs_domount()
1135 char *pathbuf; in sys_unmount() local
1145 pathbuf = malloc(MNAMELEN, M_TEMP, M_WAITOK); in sys_unmount()
1146 error = copyinstr(uap->path, pathbuf, MNAMELEN, NULL); in sys_unmount()
1148 free(pathbuf, M_TEMP); in sys_unmount()
[all …]
/trueos/cddl/contrib/opensolaris/cmd/zlook/
HDzlook.c273 char pathbuf[MAXPATHLEN]; in main() local
278 (void) strlcpy(pathbuf, argv[optind], MAXPATHLEN); in main()
279 result = pathconf(pathbuf, check); in main()
280 (void) printf("pathconf(2) check for %s\n", pathbuf); in main()
/trueos/usr.bin/rpcgen/
HDrpc_main.c81 static char pathbuf[MAXPATHLEN + 1]; variable
1134 if (strlcpy(pathbuf, argv[i], in parseargs()
1135 sizeof(pathbuf)) >= sizeof(pathbuf) in parseargs()
1136 || strlcat(pathbuf, "/cpp", in parseargs()
1137 sizeof(pathbuf)) >= in parseargs()
1138 sizeof(pathbuf)) { in parseargs()
1142 CPP = pathbuf; in parseargs()
/trueos/libexec/rtld-elf/
HDlibmap.c402 char pathbuf[64], *s, *t; in lm_findn() local
404 if (n < sizeof(pathbuf) - 1) in lm_findn()
405 s = pathbuf; in lm_findn()
411 if (s != pathbuf) in lm_findn()
/trueos/lib/libdpv/
HDdpv.c68 static char pathbuf[PATH_MAX]; variable
568 len = snprintf(pathbuf, in dpv()
571 len = snprintf(pathbuf, in dpv()
580 if ((output_out = open(pathbuf, in dpv()
583 warn("%s", pathbuf); in dpv()
/trueos/bin/ps/
HDps.c812 char pathbuf[PATH_MAX], pathbuf2[PATH_MAX], pathbuf3[PATH_MAX]; in addelem_tty() local
828 strlcpy(pathbuf, _PATH_DEV, sizeof(pathbuf)); in addelem_tty()
829 strlcat(pathbuf, elem, sizeof(pathbuf)); in addelem_tty()
830 ttypath = pathbuf; in addelem_tty()
831 if (strncmp(pathbuf, _PATH_TTY, strlen(_PATH_TTY)) == 0) in addelem_tty()
833 if (strncmp(pathbuf, _PATH_PTS, strlen(_PATH_PTS)) == 0) in addelem_tty()
835 if (strcmp(pathbuf, _PATH_CONSOLE) == 0) in addelem_tty()
/trueos/contrib/opie/
HDopiesu.c105 static char pathbuf[sizeof("PATH") + sizeof(DEFAULT_PATH) - 1] = "PATH="; variable
107 static char *cleanenv[] = {userbuf, homebuf, shellbuf, pathbuf, 0, 0};
274 strcat(pathbuf, DEFAULT_PATH);
/trueos/contrib/bmake/
HDutil.c276 char pathbuf[MAXPATHLEN], nextpathbuf[MAXPATHLEN * 2]; in getwd() local
285 pathbuf[MAXPATHLEN - 1] = '\0'; in getwd()
286 pathptr = &pathbuf[MAXPATHLEN - 1]; in getwd()

12