Home
last modified time | relevance | path

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

12

/freebsd/contrib/tcsh/
H A Dglob.c468 struct strbuf pathbuf = strbuf_INIT; in glob1() local
476 err = glob2(&pathbuf, pattern, pglob, no_match); in glob1()
477 xfree(pathbuf.s); in glob1()
487 glob2(struct strbuf *pathbuf, const Char *pattern, glob_t *pglob, int no_match) in glob2() argument
501 strbuf_terminate(pathbuf); in glob2()
503 if (Lstat(pathbuf->s, &sbuf)) in glob2()
507 pathbuf->s[pathbuf->len - 1] != SEP) && in glob2()
511 (Stat(pathbuf->s, &sbuf) == 0) && in glob2()
515 strbuf_append1(pathbuf, SEP); in glob2()
516 strbuf_terminate(pathbuf); in glob2()
[all …]
H A Dtc.os.c1218 char pathbuf[MAXPATHLEN]; /* temporary pathname buffer */ in xgetcwd() local
1219 char *pnptr = &pathbuf[(sizeof pathbuf)-1]; /* pathname pointer */ in xgetcwd()
1269 pnptr = strnrcpy(dirp->d_name, pnptr, pnptr - pathbuf); in xgetcwd()
1270 pnptr = strnrcpy("/", pnptr, pnptr - pathbuf); in xgetcwd()
1289 (void) chdir(strnrcpy(".", pnptr, pnptr - pathbuf)); in xgetcwd()
1304 char pathbuf[MAXPATHLEN], nextpathbuf[MAXPATHLEN * 2]; in xgetcwd() local
1315 pathbuf[MAXPATHLEN - 1] = '\0'; in xgetcwd()
1316 pathptr = &pathbuf[MAXPATHLEN - 1]; in xgetcwd()
1404 pathptr = strnrcpy(pathptr, d->d_name, pathptr - pathbuf); in xgetcwd()
1405 pathptr = strnrcpy(pathptr, "/", pathptr - pathbuf); in xgetcwd()
/freebsd/sbin/kldconfig/
H A Dkldconfig.c143 char pathbuf[MAXPATHLEN+1]; in addpath() local
152 if (realpath(path, pathbuf) == NULL) in addpath()
153 strlcpy(pathbuf, path, sizeof(pathbuf)); in addpath()
155 len = strlen(pathbuf); in addpath()
157 if ((len > 0) && (pathbuf[len-1] == '/')) in addpath()
158 pathbuf[--len] = '\0'; in addpath()
162 if (!strcmp(pe->path, pathbuf)) in addpath()
167 errx(1, "already in the module search path: %s", pathbuf); in addpath()
172 ((pe->path = strdup(pathbuf)) == NULL)) { in addpath()
194 char pathbuf[MAXPATHLEN+1]; in rempath() local
[all …]
/freebsd/contrib/pkgconf/libpkgconf/
H A Dpath.c68 pkgconf_buffer_t pathbuf = PKGCONF_BUFFER_INITIALIZER; in prepare_path_node() local
70 pkgconf_buffer_append(&pathbuf, text); in prepare_path_node()
71 pkgconf_path_relocate(&pathbuf); in prepare_path_node()
78 if (lstat(pkgconf_buffer_str(&pathbuf), &st) == -1) in prepare_path_node()
80 pkgconf_buffer_finalize(&pathbuf); in prepare_path_node()
87 char *linkdest = realpath(pkgconf_buffer_str(&pathbuf), realpathbuf); in prepare_path_node()
91 pkgconf_buffer_finalize(&pathbuf); in prepare_path_node()
96 if (path_list_contains_entry(&pathbuf, dirlist, &st)) in prepare_path_node()
98 pkgconf_buffer_finalize(&pathbuf); in prepare_path_node()
103 if (filter && path_list_contains_entry(&pathbuf, dirlist)) in prepare_path_node()
[all …]
H A Dpersonality.c51 pkgconf_buffer_t pathbuf = PKGCONF_BUFFER_INITIALIZER; in build_default_search_path() local
76 pkgconf_buffer_append_fmt(&pathbuf, "%s/../lib/pkgconfig", namebuf); in build_default_search_path()
77 pkgconf_path_add(pkgconf_buffer_str(&pathbuf), dirlist, true); in build_default_search_path()
78 pkgconf_buffer_reset(&pathbuf); in build_default_search_path()
80 pkgconf_buffer_append_fmt(&pathbuf, "%s/../share/pkgconfig", namebuf); in build_default_search_path()
81 pkgconf_path_add(pkgconf_buffer_str(&pathbuf), dirlist, true); in build_default_search_path()
82 pkgconf_buffer_finalize(&pathbuf); in build_default_search_path()
306 pkgconf_buffer_t pathbuf = PKGCONF_BUFFER_INITIALIZER; in load_personality_with_path() local
312 pkgconf_buffer_append(&pathbuf, path); in load_personality_with_path()
314 pkgconf_buffer_append_fmt(&pathbuf, "%s/pkgconfig/personality.d/%s.personality", path, triplet); in load_personality_with_path()
[all …]
H A Dpkg.c62 pkgconf_buffer_t pathbuf = PKGCONF_BUFFER_INITIALIZER; in pkg_get_parent_dir() local
76 pkgconf_buffer_reset(&pathbuf); in pkg_get_parent_dir()
77 pkgconf_buffer_append(&pathbuf, buf.base); in pkg_get_parent_dir()
79 targetfilename = strrchr(pathbuf.base, '/'); in pkg_get_parent_dir()
83 targetdir = pathbuf.base; in pkg_get_parent_dir()
90 targetfilename = pathbuf.base; in pkg_get_parent_dir()
128 pkgconf_buffer_finalize(&pathbuf); in pkg_get_parent_dir()
362 determine_prefix(const pkgconf_pkg_t *pkg, pkgconf_buffer_t *pathbuf) in determine_prefix() argument
364 pkgconf_buffer_append(pathbuf, pkg->filename); in determine_prefix()
365 pkgconf_path_relocate(pathbuf); in determine_prefix()
[all …]
/freebsd/contrib/openpam/lib/libpam/
H A Dopenpam_check_owner_perms.c102 char pathbuf[PATH_MAX]; in openpam_check_path_owner_perms() local
109 if (realpath(path, pathbuf) == NULL) in openpam_check_path_owner_perms()
111 len = strlen(pathbuf); in openpam_check_path_owner_perms()
113 if (stat(pathbuf, &sb) != 0) { in openpam_check_path_owner_perms()
116 openpam_log(PAM_LOG_ERROR, "%s: %m", pathbuf); in openpam_check_path_owner_perms()
123 "%s: not a regular file", pathbuf); in openpam_check_path_owner_perms()
130 "%s: insecure ownership or permissions", pathbuf); in openpam_check_path_owner_perms()
134 while (--len > 0 && pathbuf[len] != '/') in openpam_check_path_owner_perms()
135 pathbuf[len] = '\0'; in openpam_check_path_owner_perms()
/freebsd/bin/ln/
H A Dln.c177 char pathbuf[PATH_MAX]; in samedirent() local
197 memcpy(pathbuf, ".", 2); in samedirent()
199 memcpy(pathbuf, path1, file1 - path1); in samedirent()
200 pathbuf[file1 - path1] = '\0'; in samedirent()
202 if (stat(pathbuf, &sb1) != 0) in samedirent()
205 memcpy(pathbuf, ".", 2); in samedirent()
207 memcpy(pathbuf, path2, file2 - path2); in samedirent()
208 pathbuf[file2 - path2] = '\0'; in samedirent()
210 if (stat(pathbuf, &sb2) != 0) in samedirent()
/freebsd/usr.sbin/pw/
H A Dgrupd.c41 static char pathbuf[MAXPATHLEN]; in getgrpath() local
43 snprintf(pathbuf, sizeof pathbuf, "%s/%s", conf.etcpath, file); in getgrpath()
45 return (pathbuf); in getgrpath()
H A Dpwupd.c45 static char pathbuf[MAXPATHLEN]; in getpwpath() local
47 snprintf(pathbuf, sizeof pathbuf, "%s/%s", conf.etcpath, file); in getpwpath()
49 return (pathbuf); in getpwpath()
/freebsd/crypto/heimdal/lib/roken/
H A Dglob.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 …]
/freebsd/usr.bin/mail/
H A Dfio.c60 char linebuf[LINESIZE], pathbuf[PATHSIZE]; in setptr() local
64 (void)snprintf(pathbuf, sizeof(pathbuf), "%s/mail.XXXXXXXXXX", tmpdir); in setptr()
65 if ((c = mkstemp(pathbuf)) == -1 || (mestmp = Fdopen(c, "r+")) == NULL) in setptr()
66 err(1, "can't open %s", pathbuf); in setptr()
67 (void)rm(pathbuf); in setptr()
/freebsd/crypto/openssh/openbsd-compat/
H A Dglob.c614 Char pathbuf[PATH_MAX]; local
619 return(glob2(pathbuf, pathbuf+PATH_MAX-1,
620 pathbuf, pathbuf+PATH_MAX-1,
630 glob2(Char *pathbuf, Char *pathbuf_last, Char *pathend, Char *pathend_last, argument
652 if (g_lstat(pathbuf, &sb, pglob))
658 (g_stat(pathbuf, &sb, pglob) == 0) &&
666 return(globextend(pathbuf, pglob, limitp, &sb));
690 return(glob3(pathbuf, pathbuf_last, pathend,
698 glob3(Char *pathbuf, Char *pathbuf_last, Char *pathend, Char *pathend_last, argument
720 if ((dirp = g_opendir(pathbuf, pglob)) == NULL) {
[all …]
/freebsd/usr.sbin/bhyve/
H A Dbhyverun.c219 char pathbuf[64] = { 0 }; in bhyve_numa_parse() local
248 snprintf(pathbuf, sizeof(pathbuf), "domains.%d", id); in bhyve_numa_parse()
249 nvl = find_config_node(pathbuf); in bhyve_numa_parse()
251 nvl = create_config_node(pathbuf); in bhyve_numa_parse()
285 char pathbuf[64] = { 0 }; in calc_mem_affinity() local
290 snprintf(pathbuf, sizeof(pathbuf), "domains.%d", i); in calc_mem_affinity()
291 nvl = find_config_node(pathbuf); in calc_mem_affinity()
525 char pathbuf[64] = { 0 }; in set_vcpu_affinities() local
528 snprintf(pathbuf, sizeof(pathbuf), "domains.%d", dom); in set_vcpu_affinities()
529 nvl = find_config_node(pathbuf); in set_vcpu_affinities()
/freebsd/contrib/ncurses/ncurses/tinfo/
H A Dread_termcap.c793 char pathbuf[PBUFSIZ]; /* holds raw path of filenames */ in _nc_tgetent() local
800 p = pathbuf; in _nc_tgetent()
812 _nc_str_init(&desc, pathbuf, sizeof(pathbuf)); in _nc_tgetent()
837 *fname++ = pathbuf; /* tokenize path into vector of names */ in _nc_tgetent()
1038 char pathbuf[PATH_MAX]; in _nc_read_termcap_entry() local
1073 _nc_SPRINTF(pathbuf, _nc_SLIMIT(sizeof(pathbuf)) in _nc_read_termcap_entry()
1075 (int) (sizeof(pathbuf) - sizeof(PRIVATE_CAP)), in _nc_read_termcap_entry()
1077 ADD_TC(pathbuf, filecount); in _nc_read_termcap_entry()
/freebsd/lib/libc/gen/
H A Dglob.c656 Char pathbuf[MAXPATHLEN]; in glob1() local
661 return (glob2(pathbuf, pathbuf, pathbuf + MAXPATHLEN - 1, in glob1()
671 glob2(Char *pathbuf, Char *pathend, Char *pathend_last, Char *pattern, in glob2() argument
685 if (g_lstat(pathbuf, &sb, pglob)) in glob2()
697 g_stat(pathbuf, &sb, pglob) == 0 && in glob2()
707 return (globextend(pathbuf, pglob, limit, NULL)); in glob2()
734 return (glob3(pathbuf, pathend, pathend_last, pattern, in glob2()
741 glob3(Char *pathbuf, Char *pathend, Char *pathend_last, in glob3() argument
758 g_Ctoc(pathbuf, buf, sizeof(buf))) { in glob3()
765 if ((dirp = g_opendir(pathbuf, pglob)) == NULL) { in glob3()
[all …]
H A Dglob-compat11.c593 Char pathbuf[MAXPATHLEN]; in glob1() local
598 return (glob2(pathbuf, pathbuf, pathbuf + MAXPATHLEN - 1, in glob1()
608 glob2(Char *pathbuf, Char *pathend, Char *pathend_last, Char *pattern, in glob2() argument
622 if (g_lstat(pathbuf, &sb, pglob)) in glob2()
634 g_stat(pathbuf, &sb, pglob) == 0 && in glob2()
644 return (globextend(pathbuf, pglob, limit, NULL)); in glob2()
671 return (glob3(pathbuf, pathend, pathend_last, pattern, in glob2()
678 glob3(Char *pathbuf, Char *pathend, Char *pathend_last, in glob3() argument
695 g_Ctoc(pathbuf, buf, sizeof(buf))) { in glob3()
702 if ((dirp = g_opendir(pathbuf, pglob)) == NULL) { in glob3()
[all …]
/freebsd/sbin/fsck_ffs/
H A Dpass2.c63 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()
227 getpathname(pathbuf, inp->i_parent, inp->i_number); in pass2()
229 (uintmax_t)inp->i_number, pathbuf); in pass2()
230 getpathname(pathbuf, inp->i_dotdot, inp->i_dotdot); in pass2()
232 (uintmax_t)inp->i_dotdot, pathbuf); in pass2()
233 getpathname(pathbuf, inp->i_parent, inp->i_parent); in pass2()
235 (uintmax_t)inp->i_parent, pathbuf); in pass2()
/freebsd/contrib/sendmail/smrsh/
H A Dsmrsh.c151 char pathbuf[1000]; local
163 (void) sm_strlcpyn(pathbuf, sizeof pathbuf, 2, "PATH=", PATH);
164 newenv[0] = pathbuf;
/freebsd/usr.bin/rpcgen/
H A Drpc_main.c72 static char pathbuf[MAXPATHLEN + 1]; variable
1228 if (strlcpy(pathbuf, argv[i], in parseargs()
1229 sizeof(pathbuf)) >= sizeof(pathbuf) in parseargs()
1230 || strlcat(pathbuf, "/cpp", in parseargs()
1231 sizeof(pathbuf)) >= in parseargs()
1232 sizeof(pathbuf)) { in parseargs()
1236 CPP = pathbuf; in parseargs()
/freebsd/libexec/rtld-elf/
H A Dlibmap.c412 char pathbuf[64], *s, *t; in lm_findn() local
414 if (n < sizeof(pathbuf) - 1) in lm_findn()
415 s = pathbuf; in lm_findn()
421 if (s != pathbuf) in lm_findn()
/freebsd/contrib/pkgconf/tests/
H A Dtest-runner.c444 pkgconf_buffer_t pathbuf = PKGCONF_BUFFER_INITIALIZER; in prefixed_path_split() local
446 pkgconf_buffer_append(&pathbuf, prefix); in prefixed_path_split()
447 pkgconf_buffer_push_byte(&pathbuf, '/'); in prefixed_path_split()
448 pkgconf_buffer_append(&pathbuf, p); in prefixed_path_split()
449 pkgconf_path_add(pkgconf_buffer_str(&pathbuf), dirlist, false); in prefixed_path_split()
450 pkgconf_buffer_finalize(&pathbuf); in prefixed_path_split()
1476 pkgconf_buffer_t pathbuf = PKGCONF_BUFFER_INITIALIZER; in process_test_directory() local
1478 pkgconf_buffer_append(&pathbuf, dirpath); in process_test_directory()
1479 pkgconf_buffer_push_byte(&pathbuf, '/'); in process_test_directory()
1480 pkgconf_buffer_append(&pathbuf, dirent->d_name); in process_test_directory()
[all …]
/freebsd/contrib/ntp/util/
H A Dntp-keygen.c324 char pathbuf[MAXFILENAME + 1]; in main() local
486 if (RAND_file_name(pathbuf, sizeof(pathbuf)) == NULL) { in main()
491 temp = RAND_load_file(pathbuf, -1); in main()
495 pathbuf); in main()
499 "Random seed file %s %u bytes\n", pathbuf, temp); in main()
556 BIO_gets(bp, pathbuf, in main()
559 if (strcmp(pathbuf, in main()
562 else if (strcmp(pathbuf, in main()
1987 char pathbuf[MAXFILENAM in x509()
1972 char pathbuf[MAXFILENAME + 1]; x509() local
[all...]
/freebsd/bin/ps/
H A Dps.c925 char pathbuf[PATH_MAX], pathbuf2[PATH_MAX], pathbuf3[PATH_MAX]; in addelem_tty() local
941 strlcpy(pathbuf, _PATH_DEV, sizeof(pathbuf)); in addelem_tty()
942 strlcat(pathbuf, elem, sizeof(pathbuf)); in addelem_tty()
943 ttypath = pathbuf; in addelem_tty()
944 if (strncmp(pathbuf, _PATH_TTY, strlen(_PATH_TTY)) == 0) in addelem_tty()
946 if (strncmp(pathbuf, _PATH_PTS, strlen(_PATH_PTS)) == 0) in addelem_tty()
948 if (strcmp(pathbuf, _PATH_CONSOLE) == 0) in addelem_tty()
/freebsd/sys/contrib/openzfs/cmd/zed/agents/
H A Dzfs_mod.c199 char pathbuf[PATH_MAX]; in zfs_process_add() local
375 if (realpath(rawpath, pathbuf) == NULL && !is_mpath_wholedisk) { in zfs_process_add()
435 leafname = strrchr(pathbuf, '/') + 1; in zfs_process_add()
514 (void) snprintf(pathbuf, sizeof (pathbuf), "%s%s", in zfs_process_add()
517 "replaced by '%s'", path, pathbuf); in zfs_process_add()
518 path = pathbuf; in zfs_process_add()

12