| /freebsd/contrib/libarchive/test_utils/ |
| H A D | test_common.h | 164 #define assertChmod(pathname, mode) \ argument 165 assertion_chmod(__FILE__, __LINE__, pathname, mode) 167 #define assertChown(pathname, user, group) \ argument 168 assertion_chown(__FILE__, __LINE__, pathname, user, group) 195 #define assertEmptyFile(pathname) \ argument 196 assertion_empty_file(__FILE__, __LINE__, (pathname)) 198 #define assertNonEmptyFile(pathname) \ argument 199 assertion_non_empty_file(__FILE__, __LINE__, (pathname)) 200 #define assertFileAtime(pathname, sec, nsec) \ argument 201 assertion_file_atime(__FILE__, __LINE__, pathname, sec, nsec) [all …]
|
| H A D | test_main.c | 624 assertion_chdir(const char *file, int line, const char *pathname) in assertion_chdir() argument 627 if (chdir(pathname) == 0) in assertion_chdir() 629 failure_start(file, line, "chdir(\"%s\")", pathname); in assertion_chdir() 637 assertion_chmod(const char *file, int line, const char *pathname, int mode) in assertion_chmod() argument 640 if (chmod(pathname, (mode_t)mode) == 0) in assertion_chmod() 642 failure_start(file, line, "chmod(\"%s\", %4.o)", pathname, in assertion_chmod() 651 assertion_chown(const char *file, int line, const char *pathname, int user, in assertion_chown() argument 656 if (chown(pathname, (uid_t)user, (gid_t)group) == 0) in assertion_chown() 659 failure_start(file, line, "chown(\"%s\", %d, %d)", pathname, in assertion_chown() 1269 const char *pathname, const char *lines[]) in assertion_file_contains_lines_any_order() argument [all …]
|
| /freebsd/crypto/openssl/fuzz/ |
| H A D | test-corpus.c | 37 static void testfile(const char *pathname) in testfile() argument 44 if (stat(pathname, &st) < 0 || !S_ISREG(st.st_mode)) in testfile() 46 printf("# %s\n", pathname); in testfile() 48 f = fopen(pathname, "rb"); in testfile() 70 char *pathname = NULL; in main() local 79 if (pathname == NULL) { in main() 80 pathname = malloc(PATH_MAX); in main() 81 if (pathname == NULL) in main() 83 strcpy(pathname, argv[n]); in main() 85 if (strchr(":<]", pathname[dirname_len - 1]) == NULL) in main() [all …]
|
| /freebsd/sys/contrib/openzfs/cmd/zed/zed.d/ |
| H A D | zed-functions.sh | 188 local pathname="$2" 192 zed_notify_email "${subject}" "${pathname}"; rv=$? 196 zed_notify_pushbullet "${subject}" "${pathname}"; rv=$? 200 zed_notify_slack_webhook "${subject}" "${pathname}"; rv=$? 204 zed_notify_pushover "${subject}" "${pathname}"; rv=$? 208 zed_notify_ntfy "${subject}" "${pathname}"; rv=$? 212 zed_notify_gotify "${subject}" "${pathname}"; rv=$? 254 local pathname="${2:-"/dev/null"}" 268 if [ ! -r "${pathname}" ]; then 270 "${ZED_EMAIL_PROG##*/} cannot read \"${pathname}\"" [all …]
|
| /freebsd/contrib/libarchive/libarchive_fe/ |
| H A D | line_reader.c | 51 char *pathname; member 57 lafe_line_reader(const char *pathname, int nullSeparator) in lafe_line_reader() argument 63 lafe_errc(1, ENOMEM, "Can't open %s", pathname); in lafe_line_reader() 66 lr->pathname = strdup(pathname); in lafe_line_reader() 67 if (lr->pathname == NULL) in lafe_line_reader() 68 lafe_errc(1, ENOMEM, "Can't open %s", pathname); in lafe_line_reader() 70 if (strcmp(pathname, "-") == 0) in lafe_line_reader() 73 lr->f = fopen(pathname, "r"); in lafe_line_reader() 75 lafe_errc(1, errno, "Couldn't open %s", pathname); in lafe_line_reader() 130 "Line too long in %s", lr->pathname); in lafe_line_reader_next() [all …]
|
| /freebsd/contrib/libarchive/libarchive/test/ |
| H A D | test_read_format_isojoliet_long.c | 61 char pathname[104]; in DEFINE_TEST() 70 pathname[i] = '0' + ((i+1) % 10); in DEFINE_TEST() 97 pathname[100] = 'd'; in DEFINE_TEST() 98 pathname[101] = 'i'; in DEFINE_TEST() 99 pathname[102] = 'r'; in DEFINE_TEST() 100 pathname[103] = '\0'; in DEFINE_TEST() 102 assertEqualString(pathname, archive_entry_pathname(ae)); in DEFINE_TEST() 110 /* A regular file with two names (pathname gets returned in DEFINE_TEST() 112 pathname[100] = '1'; in DEFINE_TEST() 113 pathname[10 in DEFINE_TEST() 62 char pathname[104]; DEFINE_TEST() local [all...] |
| H A D | main.c | 461 assertion_chdir(const char *file, int line, const char *pathname) in assertion_chdir() argument 464 if (chdir(pathname) == 0) in assertion_chdir() 466 failure_start(file, line, "chdir(\"%s\")", pathname); in assertion_chdir() 1059 const char *pathname, const char *lines[]) in assertion_file_contains_lines_any_order() argument 1071 buff = slurpfile(&buff_size, "%s", pathname); in assertion_file_contains_lines_any_order() 1073 failure_start(pathname, line, "Can't read file: %s", pathname); in assertion_file_contains_lines_any_order() 1086 failure_start(pathname, line, "Can't allocate memory"); in assertion_file_contains_lines_any_order() 1108 failure_start(pathname, line, "Can't allocate memory"); in assertion_file_contains_lines_any_order() 1153 failure_start(file, line, "File doesn't match: %s", pathname); in assertion_file_contains_lines_any_order() 1174 const char *pathname, const char *strings[]) in assertion_file_contains_no_invalid_strings() argument [all …]
|
| /freebsd/contrib/libarchive/unzip/ |
| H A D | bsdunzip.c | 325 accept_pathname(const char *pathname) in accept_pathname() argument 328 if (!STAILQ_EMPTY(&include) && !match_pattern(&include, pathname)) in accept_pathname() 330 if (!STAILQ_EMPTY(&exclude) && match_pattern(&exclude, pathname)) in accept_pathname() 533 extract2fd(struct archive *a, char *pathname, int fd) in extract2fd() argument 558 error("write('%s')", pathname); in extract2fd() 585 error("write('%s')", pathname); in extract2fd() 595 " heuristic", pathname); in extract2fd() 608 error("write('%s')", pathname); in extract2fd() 765 char *pathname, *realpathname; in extract() local 769 if ((pathname = pathdup(archive_entry_pathname(e))) == NULL) { in extract() [all …]
|
| /freebsd/usr.bin/procstat/ |
| H A D | procstat_bin.c | 47 static char pathname[PATH_MAX]; in procstat_bin() local 53 if (procstat_getpathname(prstat, kipp, pathname, sizeof(pathname)) != 0) in procstat_bin() 55 if (strlen(pathname) == 0) in procstat_bin() 56 strcpy(pathname, "-"); in procstat_bin() 63 xo_emit("{:pathname/%s}\n", pathname); in procstat_bin()
|
| /freebsd/contrib/sendmail/src/ |
| H A D | mci.c | 1178 mci_traverse_persistent(action, pathname) 1180 char *pathname; variable 1186 if (pathname == NULL) 1187 pathname = HostStatDir; 1188 if (pathname == NULL) 1192 sm_dprintf("mci_traverse: pathname is %s\n", pathname); 1194 ret = stat(pathname, &statbuf); 1199 pathname, sm_errstring(errno)); 1213 if ((d = opendir(pathname)) == NULL) 1217 pathname, sm_errstring(errno)); [all …]
|
| /freebsd/contrib/less/ |
| H A D | lesskey.c | 145 char *pathname; in mkpathname() local 147 pathname = ecalloc(strlen(dirname) + strlen(filename) + 2, sizeof(char)); in mkpathname() 148 strcpy(pathname, dirname); in mkpathname() 149 strcat(pathname, PATHNAME_SEP); in mkpathname() 150 strcat(pathname, filename); in mkpathname() 151 return (pathname); in mkpathname() 160 char *pathname; in homefile() local 163 pathname = mkpathname(p, filename); in homefile() 166 pathname = mkpathname(p, filename); in homefile() 171 pathname = mkpathname(".", filename); in homefile() [all …]
|
| H A D | filename.c | 242 char *pathname; in dirfile() local 252 pathname = (char *) calloc(len, sizeof(char)); in dirfile() 253 if (pathname == NULL) in dirfile() 255 SNPRINTF3(pathname, len, "%s%s%s", dirname, PATHNAME_SEP, filename); in dirfile() 261 f = open(pathname, OPEN_READ); in dirfile() 264 free(pathname); in dirfile() 265 pathname = NULL; in dirfile() 271 return (pathname); in dirfile() 279 char *pathname; in homefile() local 282 pathname = dirfile(lgetenv("HOME"), filename, 1); in homefile() [all …]
|
| /freebsd/sys/contrib/openzfs/cmd/ |
| H A D | zfs_ids_to_path.c | 85 char pathname[PATH_MAX * 2]; in main() local 87 zpool_obj_to_path_ds(pool, objset, object, pathname, in main() 88 sizeof (pathname)); in main() 90 zpool_obj_to_path(pool, objset, object, pathname, in main() 91 sizeof (pathname)); in main() 93 printf("%s\n", pathname); in main()
|
| /freebsd/contrib/libarchive/libarchive/ |
| H A D | archive_match.c | 67 struct archive_mstring pathname; member 355 const char *pathname, int nullSeparator) in archive_match_exclude_pattern_from_file() argument 363 return add_pattern_from_file(a, &(a->exclusions), 1, pathname, in archive_match_exclude_pattern_from_file() 369 const wchar_t *pathname, int nullSeparator) in archive_match_exclude_pattern_from_file_w() argument 377 return add_pattern_from_file(a, &(a->exclusions), 0, pathname, in archive_match_exclude_pattern_from_file_w() 421 const char *pathname, int nullSeparator) in archive_match_include_pattern_from_file() argument 429 return add_pattern_from_file(a, &(a->inclusions), 1, pathname, in archive_match_include_pattern_from_file() 435 const wchar_t *pathname, int nullSeparator) in archive_match_include_pattern_from_file_w() argument 443 return add_pattern_from_file(a, &(a->inclusions), 0, pathname, in archive_match_include_pattern_from_file_w() 598 int mbs, const void *pathname, int nullSeparator) in add_pattern_from_file() argument [all …]
|
| H A D | archive_write_set_format_ar.c | 152 const char *pathname; in archive_write_ar_header() local 166 pathname = archive_entry_pathname(entry); in archive_write_ar_header() 167 if (pathname == NULL || *pathname == '\0') { in archive_write_ar_header() 185 if (strcmp(pathname, "/") == 0 ) { in archive_write_ar_header() 190 if (strcmp(pathname, "/SYM64/") == 0) { in archive_write_ar_header() 195 if (strcmp(pathname, "__.SYMDEF") == 0) { in archive_write_ar_header() 200 if (strcmp(pathname, "//") == 0) { in archive_write_ar_header() 218 if ((filename = ar_basename(pathname)) == NULL) { in archive_write_ar_header()
|
| /freebsd/sys/contrib/openzfs/include/sys/ |
| H A D | pathname.h | 56 typedef struct pathname { struct 61 extern void pn_alloc(struct pathname *); argument 62 extern void pn_alloc_sz(struct pathname *, size_t); 63 extern void pn_free(struct pathname *);
|
| /freebsd/tests/sys/capsicum/ |
| H A D | capsicum-test.cc | 30 std::string pathname(p); in TmpFile() local 31 if (tmp_paths.find(pathname) == tmp_paths.end()) { in TmpFile() 32 std::string fullname = tmpdir + "/" + pathname; in TmpFile() 33 tmp_paths[pathname] = fullname; in TmpFile() 35 return tmp_paths[pathname].c_str(); in TmpFile()
|
| /freebsd/usr.sbin/pmcstat/ |
| H A D | pmcpl_gprof.c | 129 const char *pathname; in pmcstat_gmon_create_file() local 132 pathname = pmcstat_string_unintern(pgf->pgf_name); in pmcstat_gmon_create_file() 133 if ((fd = open(pathname, O_RDWR|O_NOFOLLOW|O_CREAT, in pmcstat_gmon_create_file() 135 err(EX_OSERR, "ERROR: Cannot open \"%s\"", pathname); in pmcstat_gmon_create_file() 170 err(EX_OSERR, "ERROR: Cannot write \"%s\"", pathname); in pmcstat_gmon_create_file() 205 const char *pathname; in pmcstat_gmon_map_file() local 207 pathname = pmcstat_string_unintern(pgf->pgf_name); in pmcstat_gmon_map_file() 210 if ((fd = open(pathname, O_RDWR | O_NOFOLLOW, 0)) < 0) in pmcstat_gmon_map_file() 211 err(EX_OSERR, "ERROR: cannot open \"%s\"", pathname); in pmcstat_gmon_map_file() 217 err(EX_OSERR, "ERROR: cannot map \"%s\"", pathname); in pmcstat_gmon_map_file() [all …]
|
| /freebsd/contrib/bmake/ |
| H A D | str.h | 199 Substring_Dirname(Substring pathname) in Substring_Dirname() argument 203 for (p = pathname.end; p != pathname.start; p--) in Substring_Dirname() 205 return Substring_Init(pathname.start, p - 1); in Substring_Dirname() 210 Substring_Basename(Substring pathname) in Substring_Basename() argument 214 for (p = pathname.end; p != pathname.start; p--) in Substring_Basename() 216 return Substring_Init(p, pathname.end); in Substring_Basename() 217 return pathname; in Substring_Basename()
|
| /freebsd/sys/contrib/zstd/programs/ |
| H A D | util.c | 990 static int pathnameHas2Dots(const char *pathname) in pathnameHas2Dots() argument 996 const char *needle = pathname; in pathnameHas2Dots() 1004 if ((needle == pathname || needle[-1] == PATH_SEP) in pathnameHas2Dots() 1053 static void convertPathnameToDirName(char *pathname) in convertPathnameToDirName() argument 1058 assert(pathname != NULL); in convertPathnameToDirName() 1061 len = strlen(pathname); in convertPathnameToDirName() 1063 while (pathname[len] == PATH_SEP) { in convertPathnameToDirName() 1064 pathname[len] = '\0'; in convertPathnameToDirName() 1074 pos = strrchr(pathname, PATH_SEP); in convertPathnameToDirName() 1076 pathname[0] = '.'; in convertPathnameToDirName() [all …]
|
| /freebsd/contrib/libarchive/tar/test/ |
| H A D | test_option_fflags.c | 14 clear_fflags(const char *pathname) in clear_fflags() argument 17 chflags(pathname, 0); in clear_fflags() 22 fd = open(pathname, O_RDONLY | O_NONBLOCK); in clear_fflags() 33 (void)pathname; /* UNUSED */ in clear_fflags()
|
| /freebsd/contrib/mtree/ |
| H A D | excludes.c | 62 int pathname; member 96 e->pathname = 1; in read_excludes_file() 98 e->pathname = 0; in read_excludes_file() 114 if ((e->pathname && MATCH(e->glob, path)) in check_excludes()
|
| /freebsd/crypto/openssl/crypto/x509/ |
| H A D | x509_def.c | 31 static void get_windows_default_path(char *pathname, const char *suffix) in get_windows_default_path() argument 40 OPENSSL_strlcpy(pathname, ossldir, MAX_PATH - 1); in get_windows_default_path() 41 if (MAX_PATH - strlen(pathname) > strlen(suffix)) in get_windows_default_path() 42 strcat(pathname, suffix); in get_windows_default_path()
|
| /freebsd/contrib/unbound/testcode/ |
| H A D | testbound.c | 522 static int delete_file(const char *pathname) { in delete_file() argument 523 int ret = unlink(pathname); in delete_file() 524 free((void *)pathname); in delete_file() 531 char *pathname = strdup("/tmp/fuzz-XXXXXX"); in buf_to_file() local 532 if (pathname == NULL) in buf_to_file() 535 fd = mkstemp(pathname); in buf_to_file() 537 log_err("mkstemp of file %s failed: %s", pathname, strerror(errno)); in buf_to_file() 538 free(pathname); in buf_to_file() 547 log_err("write to file %s failed: %s", pathname, strerror(errno)); in buf_to_file() 554 log_err("close of file %s failed: %s", pathname, strerror(errno)); in buf_to_file() [all …]
|
| /freebsd/sys/contrib/openzfs/module/zfs/ |
| H A D | pathname.c | 68 pn_alloc(struct pathname *pnp) in pn_alloc() 73 pn_alloc_sz(struct pathname *pnp, size_t sz) in pn_alloc_sz() 83 pn_free(struct pathname *pnp) in pn_free()
|