/freebsd/contrib/netbsd-tests/include/ |
H A D | t_bitstring.c | 46 printbits(FILE *file, bitstr_t *b, int n) in printbits() argument 54 (void) fprintf(file, "%3d %3d ", jc, js); in printbits() 57 (void) fprintf(file, "%c", (bit_test(b, i) ? '1' : '0')); in printbits() 60 (void) fprintf(file, "%c", '\n'); in printbits() 64 calculate_data(FILE *file, const int test_length) in calculate_data() argument 71 (void) fprintf(file, "Testing with TEST_LENGTH = %d\n\n", test_length); in calculate_data() 73 (void) fprintf(file, "test _bit_byte, _bit_mask, and bitstr_size\n"); in calculate_data() 74 (void) fprintf(file, " i _bit_byte(i) _bit_mask(i) bitstr_size(i)\n"); in calculate_data() 77 (void) fprintf(file, "%3d%15u%15u%15zu\n", in calculate_data() 83 (void) fprintf(file, "\ntest bit_alloc, clearbits, bit_ffc, bit_ffs\n"); in calculate_data() [all …]
|
/freebsd/usr.sbin/etcupdate/ |
H A D | etcupdate.sh | 40 # unmodified file, the new version of the file, and the modified file. 41 # This requires having all three versions of the file available when 73 etcupdate revert [-d workdir] [-D destdir] [-L logfile] file ... 93 # file with " " prepended. 109 # Output a text description of a specified file's type. 111 # $1 - file pathname. 117 # Returns true (0) if a file exists 119 # $1 - file pathnam [all...] |
/freebsd/tools/test/stress2/tools/ |
H A D | bench.c | 64 char file[128]; in cr1() local 73 snprintf(file, sizeof(file), "%s.%06d.%03d", in cr1() 75 if ((fd = open(file, O_RDWR | O_CREAT | O_TRUNC, in cr1() 77 err(1, "open(%s)", file); in cr1() 83 snprintf(file, sizeof(file), "%s.%06d.%03d", in cr1() 85 if (unlink(file) == -1) in cr1() 86 err(1, "unlink(%s)", file); in cr1() 95 char file[1024]; in cr2() local 104 snprintf(file, sizeof(file), "%s.%06d.%03d", in cr2() 106 if ((fd = open(file, O_RDWR | O_CREAT | O_TRUNC, in cr2() [all …]
|
/freebsd/contrib/netbsd-tests/usr.bin/id/ |
H A D | t_id.sh | 45 atf_check -s eq:0 -o file:expout -e empty ./run_id.sh 46 atf_check -s eq:0 -o file:expout -e empty ./run_id.sh 100 47 atf_check -s eq:0 -o file:expout -e empty ./run_id.sh test 50 atf_check -s eq:0 -o file:expout -e empty ./run_id.sh 0 51 atf_check -s eq:0 -o file:expout -e empty ./run_id.sh root 55 atf_check -s eq:0 -o file:expout -e empty ./run_id.sh 59 atf_check -s eq:1 -o empty -e file:experr ./run_id.sh nonexistent 93 atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -G 94 atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -G 100 95 atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -G test [all …]
|
/freebsd/tools/test/stress2/misc/ |
H A D | bench.sh | 105 char file[128]; 111 snprintf(file, sizeof(file), "t1.%06d.%03d", getpid(), i); 112 if ((fd = open(file, O_RDWR | O_CREAT | O_TRUNC, 114 err(1, "open(%s)", file); 116 if (unlink(file) == -1) 117 err(1, "unlink(%s)", file); 127 char file[128]; 133 snprintf(file, sizeof(file), "t2.%06d.%03d", getpid(), i); 134 if ((fd = open(file, O_RDWR | O_CREAT | O_TRUNC, 136 err(1, "open(%s)", file); [all …]
|
H A D | nlink3.sh | 47 char file[100]; 49 snprintf(file, sizeof(file), "f"); 50 if ((fd = open(file, O_RDWR | O_CREAT | O_TRUNC, 52 err(1, "creat(%s)", file); 57 snprintf(file, sizeof(file), "%d", i); 58 if (link("f", file) == -1) 59 err(1, "link(%s, %s)", "f", file); 65 snprintf(file, sizeof(file), "%d", i); 66 if (link("f", file) != -1) 67 err(1, "link(%s, %s)", "f", file); [all …]
|
H A D | fragments.sh | 97 char file[128]; 103 sprintf(file,"t%05d", i); 104 unlink(file); 112 sprintf(file,"t%05d", j); 113 if (stat(file, &sb) != 0) 117 unlink(file); 120 if (truncate(file, 0) == 0) { 138 sprintf(file,"t%05d", j); 139 if (unlink(file) == 0) { 149 char file[128]; [all …]
|
/freebsd/usr.bin/tail/ |
H A D | forward.c | 238 show(file_info_t *file) in show() argument 242 while ((ch = getc(file->fp)) != EOF) { in show() 243 if (last != file) { in show() 245 printfn(file->file_name, 1); in show() 246 last = file; in show() 252 if (ferror(file->fp)) { in show() 253 fclose(file->fp); in show() 254 file->fp = NULL; in show() 255 ierr(file->file_name); in show() 258 clearerr(file->fp); in show() [all …]
|
/freebsd/usr.sbin/etcupdate/tests/ |
H A D | always_test.sh | 106 echo "foo" > $OLD/first/difffiles/second/file 107 echo "bar" > $TEST/first/difffiles/second/file 122 echo "new" > $NEW/second/second/difffiles/file 123 echo "test" > $TEST/second/second/difffiles/file 152 ln -s "old" $OLD/difftype/difftype/difffiles/file 153 echo "foo" > $NEW/difftype/difftype/difffiles/file 154 echo "bar" > $TEST/difftype/difftype/difffiles/file 177 echo "foo" > $OLD/difffiles/first/first/file 178 echo "bar" > $NEW/difffiles/first/first/file 183 echo "old" > $OLD/difffiles/difftype/difftype/file [all …]
|
H A D | tests_test.sh | 109 echo "foo" > $i/equal/equal/equal/file 118 echo "foo" > $i/equal/first/first/file 142 echo "foo" > $i/equal/difffiles/difffiles/file 144 echo "bar" > $TEST/equal/difffiles/difffiles/file 150 echo "foo" > $i/first/equal/second/file 154 echo "foo" > $i/first/equal/second/fulldir/file 163 echo "foo" > $OLD/first/first/equal/file 191 echo "foo" > $OLD/first/difffiles/second/file 192 echo "bar" > $TEST/first/difffiles/second/file 199 echo "bar" > $NEW/second/equal/first/file [all …]
|
H A D | fbsdid_test.sh | 70 local file 72 file=$1 75 echo -n '# $FreeBSD' >> $file 76 echo -n "$@" >> $file 77 echo '$' >> $file 102 an old file 107 a new file 117 another old file 122 another new file 139 this is the old file [all …]
|
/freebsd/sys/compat/linuxkpi/common/include/linux/ |
H A D | file.h | 44 #undef file 51 struct file *file; in linux_fget() local 54 if (fget_unlocked(curthread, fd, &cap_no_rights, &file) != 0) in linux_fget() 58 if (file->f_data == NULL || in linux_fget() 59 file->f_ops != &linuxfileops) { in linux_fget() 60 fdrop(file, curthread); in linux_fget() 63 return ((struct linux_file *)file->f_data); in linux_fget() 87 struct file *file; in put_unused_fd() local 89 if (fget_unlocked(curthread, fd, &cap_no_rights, &file) != 0) { in put_unused_fd() 97 fdclose(curthread, file, fd); in put_unused_fd() [all …]
|
/freebsd/contrib/netbsd-tests/usr.bin/sdiff/ |
H A D | t_sdiff.sh | 35 atf_check -o file:$(atf_get_srcdir)/d_flags_l.out -s eq:1 \ 38 atf_check -o file:$(atf_get_srcdir)/d_flags_s.out -s eq:1 \ 41 atf_check -o file:$(atf_get_srcdir)/d_flags_w.out -s eq:1 \ 55 atf_check -o file:$(atf_get_srcdir)/d_iflags_a1.out -s eq:1 sdiff ${tail1} 56 atf_check -o file:$(atf_get_srcdir)/d_iflags_a2.out -s eq:1 sdiff ${tail2} 57 atf_check -o file:$(atf_get_srcdir)/d_iflags_b1.out -s eq:1 sdiff -s ${tail1} 58 atf_check -o file:$(atf_get_srcdir)/d_iflags_b2.out -s eq:1 sdiff -s ${tail2} 59 atf_check -o file:$(atf_get_srcdir)/d_iflags_c1.out -s eq:1 sdiff -l ${tail1} 60 atf_check -o file:$(atf_get_srcdir)/d_iflags_c2.out -s eq:1 sdiff -l ${tail2} 61 atf_check -o file:$(atf_get_srcdir)/d_iflags_d1.out -s eq:1 sdiff -s ${tail1} [all …]
|
/freebsd/sys/ofed/drivers/infiniband/core/ |
H A D | ib_user_mad.c | 152 static int hdr_size(struct ib_umad_file *file) in hdr_size() argument 154 return file->use_pkey_index ? sizeof (struct ib_user_mad_hdr) : in hdr_size() 159 static struct ib_mad_agent *__get_agent(struct ib_umad_file *file, int id) in __get_agent() argument 161 return file->agents_dead ? NULL : file->agent[id]; in __get_agent() 164 static int queue_packet(struct ib_umad_file *file, in queue_packet() argument 170 mutex_lock(&file->mutex); in queue_packet() 175 if (agent == __get_agent(file, packet->mad.hdr.id)) { in queue_packet() 176 list_add_tail(&packet->list, &file->recv_list); in queue_packet() 177 wake_up_interruptible(&file->recv_wait); in queue_packet() 182 mutex_unlock(&file->mutex); in queue_packet() [all …]
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/acl/off/ |
H A D | posixmode.ksh | 71 typeset file=$dir/file 79 log_must touch $file 80 log_must chown :$wheel $file 82 log_must rm $file 84 log_must touch $file 85 log_must chown :$wheel $file 86 log_must user_run $other rm $file 89 log_must user_run $owner touch $file 90 log_must chown :$group $file 92 log_must user_run $owner rm $file [all …]
|
/freebsd/sys/contrib/libsodium/regen-msvc/ |
H A D | regen-msvc.py | 11 for file in glob.iglob("src/libsodium/**/*.c", recursive=True): 12 file = file.replace("/", "\\") variable 13 tlv1 = tlv1 + " <ClCompile Include=\"{}\" />\r\n".format(file) 16 for file in glob.iglob("src/libsodium/**/*.h", recursive=True): 17 file = file.replace("/", "\\") variable 18 tlv2 = tlv2 + " <ClInclude Include=\"{}\" />\r\n".format(file) 21 for file in glob.iglob("src/libsodium/**/*.c", recursive=True): 22 file = file.replace("/", "\\") variable 23 tlf1 = tlf1 + " <ClCompile Include=\"{}\">\r\n".format(file) 28 for file in glob.iglob("src/libsodium/**/*.h", recursive=True): [all …]
|
/freebsd/share/mk/ |
H A D | bsd.files.mk | 67 .for file in ${${group}} 68 ${group}OWN_${file}?= ${${group}OWN} 69 ${group}GRP_${file}?= ${${group}GRP} 71 ${group}OWN_${file}= ${SHAREOWN} 72 ${group}GRP_${file}= ${SHAREGRP} 74 ${group}MODE_${file}?= ${${group}MODE} 78 ${group}DIR_${file}?= ${${group}DIR} 79 .if ${${group}DIR_${file}:S/^\///} == ${${group}DIR_${file}} 81 _${group}DIR_${file}= ${${group}DIR_${file}} 84 _${group}DIR_${file}= ${group}DIR_${file} [all …]
|
/freebsd/contrib/libarchive/libarchive/ |
H A D | archive_read_support_format_iso9660.c | 337 struct file_info *file; member 424 struct file_info *file, const unsigned char *start, 427 struct file_info *file); 445 struct file_info *file); 448 struct file_info *file, uint64_t key); 451 #define add_entry(arch, iso9660, file) \ argument 452 heap_add_entry(arch, &((iso9660)->pending_files), file, file->offset) 1161 struct file_info *file; in choose_volume() local 1196 file = parse_file_info(a, NULL, block, vd->size); in choose_volume() 1197 if (file == NULL) in choose_volume() [all …]
|
/freebsd/tests/sys/audit/ |
H A D | Makefile | 3 ATF_TESTS_C= file-attribute-access 4 ATF_TESTS_C+= file-attribute-modify 5 ATF_TESTS_C+= file-create 6 ATF_TESTS_C+= file-delete 7 ATF_TESTS_C+= file-close 8 ATF_TESTS_C+= file-write 9 ATF_TESTS_C+= file-read 18 SRCS.file-attribute-access+= file-attribute-access.c 19 SRCS.file-attribute-access+= utils.c 20 SRCS.file-attribute-modify+= file-attribute-modify.c [all …]
|
/freebsd/contrib/diff/src/ |
H A D | diff.c | 1039 #define DIR_P(f) (S_ISDIR (cmp.file[f].stat.st_mode) != 0) in compare_files() 1054 char const *dir = parent->file[name0 == 0].name; in compare_files() 1064 memset (cmp.file, 0, sizeof cmp.file); in compare_files() 1074 cmp.file[0].desc = name0 == 0 ? NONEXISTENT : UNOPENED; in compare_files() 1075 cmp.file[1].desc = name1 == 0 ? NONEXISTENT : UNOPENED; in compare_files() 1088 cmp.file[0].name = name0; in compare_files() 1089 cmp.file[1].name = name1; in compare_files() 1093 cmp.file[0].name = free0 in compare_files() 1094 = dir_file_pathname (parent->file[0].name, name0); in compare_files() 1095 cmp.file[1].name = free1 in compare_files() [all …]
|
/freebsd/usr.bin/sdiff/tests/ |
H A D | sdiff_test.sh | 35 atf_check -o file:$(atf_get_srcdir)/d_flags_l.out -s eq:1 \ 38 atf_check -o file:$(atf_get_srcdir)/d_flags_s.out -s eq:1 \ 41 atf_check -o file:$(atf_get_srcdir)/d_flags_w.out -s eq:1 \ 55 atf_check -o file:$(atf_get_srcdir)/d_iflags_a1.out -s eq:1 sdiff ${tail1} 56 atf_check -o file:$(atf_get_srcdir)/d_iflags_a2.out -s eq:1 sdiff ${tail2} 57 atf_check -o file:$(atf_get_srcdir)/d_iflags_b1.out -s eq:1 sdiff -s ${tail1} 58 atf_check -o file:$(atf_get_srcdir)/d_iflags_b2.out -s eq:1 sdiff -s ${tail2} 59 atf_check -o file:$(atf_get_srcdir)/d_iflags_c1.out -s eq:1 sdiff -l ${tail1} 60 atf_check -o file:$(atf_get_srcdir)/d_iflags_c2.out -s eq:1 sdiff -l ${tail2} 61 atf_check -o file:$(atf_get_srcdir)/d_iflags_d1.out -s eq:1 sdiff -s ${tail1} [all …]
|
/freebsd/usr.bin/hexdump/tests/ |
H A D | hexdump_test.sh | 41 atf_check -o file:"$(atf_get_srcdir)/d_hexdump_bflag_a.out" \ 43 atf_check -o file:"$(atf_get_srcdir)/d_hexdump_bflag_b.out" \ 45 atf_check -o file:"$(atf_get_srcdir)/d_hexdump_bflag_c.out" \ 56 atf_check -o file:"$(atf_get_srcdir)/d_hexdump_cflag_a.out" \ 58 atf_check -o file:"$(atf_get_srcdir)/d_hexdump_cflag_b.out" \ 60 atf_check -o file:"$(atf_get_srcdir)/d_hexdump_cflag_c.out" \ 71 atf_check -o file:"$(atf_get_srcdir)/d_hexdump_UCflag_a.out" \ 73 atf_check -o file:"$(atf_get_srcdir)/d_hexdump_UCflag_b.out" \ 75 atf_check -o file:"$(atf_get_srcdir)/d_hexdump_UCflag_c.out" \ 77 atf_check -o file:"$(atf_get_srcdir)/d_hexdump_UCflag_bug118723.out" \ [all …]
|
/freebsd/sys/contrib/dev/mediatek/mt76/ |
H A D | mt76x02_debugfs.c | 10 mt76x02_ampdu_stat_show(struct seq_file *file, void *data) in mt76x02_ampdu_stat_show() argument 12 struct mt76x02_dev *dev = file->private; in mt76x02_ampdu_stat_show() 16 seq_puts(file, "Length: "); in mt76x02_ampdu_stat_show() 18 seq_printf(file, "%8d | ", i * 8 + j + 1); in mt76x02_ampdu_stat_show() 19 seq_puts(file, "\n"); in mt76x02_ampdu_stat_show() 20 seq_puts(file, "Count: "); in mt76x02_ampdu_stat_show() 22 seq_printf(file, "%8d | ", in mt76x02_ampdu_stat_show() 24 seq_puts(file, "\n"); in mt76x02_ampdu_stat_show() 25 seq_puts(file, "--------"); in mt76x02_ampdu_stat_show() 27 seq_puts(file, "-----------"); in mt76x02_ampdu_stat_show() [all …]
|
/freebsd/contrib/netbsd-tests/bin/cp/ |
H A D | t_cp.sh | 41 echo "I'm a file" > file 44 ln -s file link 64 chmod 777 file 65 atf_check -s eq:0 -o empty -e empty cp file file2 66 cp_compare file_to_file_simple file file2 71 chmod 644 file 73 cp_compare file_to_file_simple file file2 81 chmod 644 file 82 chflags nodump file 83 atf_check -s eq:0 -o empty -e empty cp -p file file3 [all …]
|
/freebsd/sys/sys/ |
H A D | file.h | 77 struct file; 88 off_t foffset_lock(struct file *fp, int flags); 89 void foffset_lock_uio(struct file *fp, struct uio *uio, int flags); 90 void foffset_unlock(struct file *fp, off_t val, int flags); 91 void foffset_unlock_uio(struct file *fp, struct uio *uio, int flags); 94 foffset_get(struct file *fp) in foffset_get() 100 typedef int fo_rdwr_t(struct file *fp, struct uio *uio, 103 typedef int fo_truncate_t(struct file *fp, off_t length, 105 typedef int fo_ioctl_t(struct file *fp, u_long com, void *data, 107 typedef int fo_poll_t(struct file *fp, int events, [all …]
|