/tools/testing/selftests/efivarfs/ |
D | efivarfs.sh | 56 local file=$efivarfs_mount/$FUNCNAME-$test_guid 58 printf "$attrs\x00" > $file 60 if [ ! -e $file ]; then 61 echo "$file couldn't be created" >&2 65 if [ $(stat -c %s $file) -ne 5 ]; then 66 echo "$file has invalid size" >&2 67 file_cleanup $file 70 file_cleanup $file 75 local file=$efivarfs_mount/$FUNCNAME-$test_guid 77 : > $file [all …]
|
/tools/testing/selftests/rcutorture/bin/ |
D | parse-console.sh | 15 file="$1" 23 if test -f "$file" -a -r "$file" 27 echo $title unreadable console output file: $file 30 if grep -Pq '\x00' < $file 34 cat /dev/null > $file.diags 41 if grep -q FAILURE $file || grep -q -e '-torture.*!!!' $file 43 nerrs=`grep --binary-files=text '!!!' $file | 55 grep --binary-files=text 'torture:.*ver:' $file | 83 if grep -q SUCCESS $file 88 echo " " $file [all …]
|
/tools/perf/util/ |
D | data.c | 48 struct perf_data_file *file = &files[i]; in perf_data__create_dir() local 50 ret = asprintf(&file->path, "%s/data.%d", data->path, i); in perf_data__create_dir() 54 ret = open(file->path, O_RDWR|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR); in perf_data__create_dir() 58 file->fd = ret; in perf_data__create_dir() 91 struct perf_data_file *file; in perf_data__open_dir() local 104 file = realloc(files, (nr + 1) * sizeof(*files)); in perf_data__open_dir() 105 if (!file) in perf_data__open_dir() 108 files = file; in perf_data__open_dir() 109 file = &files[nr++]; in perf_data__open_dir() 111 file->path = strdup(path); in perf_data__open_dir() [all …]
|
/tools/power/acpi/tools/acpidump/ |
D | apfiles.c | 67 ACPI_FILE file; in ap_open_output_file() local 77 file = fopen(pathname, "w"); in ap_open_output_file() 78 if (!file) { in ap_open_output_file() 85 gbl_output_file = file; in ap_open_output_file() 108 ACPI_FILE file; in ap_write_to_binary_file() local 148 file = fopen(filename, "wb"); in ap_write_to_binary_file() 149 if (!file) { in ap_write_to_binary_file() 154 actual = fwrite(table, 1, table_length, file); in ap_write_to_binary_file() 158 fclose(file); in ap_write_to_binary_file() 162 fclose(file); in ap_write_to_binary_file() [all …]
|
/tools/testing/selftests/filesystems/incfs/ |
D | incfs_test.c | 132 static int get_file_block_seed(int file, int block) in get_file_block_seed() argument 134 return 7919 * file + block; in get_file_block_seed() 269 static int emit_test_blocks(char *mnt_dir, struct test_file *file, in emit_test_blocks() argument 293 bool compress = (file->index + block_index) % 2 == 0; in emit_test_blocks() 294 int seed = get_file_block_seed(file->index, block_index); in emit_test_blocks() 299 if (block_offset > file->size) { in emit_test_blocks() 303 if (file->size - block_offset > in emit_test_blocks() 307 block_size = file->size - block_offset; in emit_test_blocks() 342 fd = open_file_by_id(mnt_dir, file->id, false); in emit_test_blocks() 355 fd = open_file_by_id(mnt_dir, file->id, true); in emit_test_blocks() [all …]
|
/tools/testing/selftests/cpufreq/ |
D | cpufreq.sh | 52 for file in $files; do 53 if [ -f $1/$file ]; then 54 printf "$file:" 55 cat $1/$file 58 read_cpufreq_files_in_dir "$1/$file" 84 for file in $files; do 85 if [ -f $1/$file ]; then 87 local wfile=$(ls -l $1/$file | awk '$1 ~ /^.*w.*/ { print $NF; }') 92 if [ $file != "scaling_setspeed" ]; then 93 local val=$(cat $1/$file) [all …]
|
/tools/objtool/ |
D | check.c | 32 struct instruction *find_insn(struct objtool_file *file, in find_insn() argument 37 hash_for_each_possible(file->insn_hash, insn, hash, offset) in find_insn() 44 static struct instruction *next_insn_same_sec(struct objtool_file *file, in next_insn_same_sec() argument 49 if (!next || &next->list == &file->insn_list || next->sec != insn->sec) in next_insn_same_sec() 55 static struct instruction *next_insn_same_func(struct objtool_file *file, in next_insn_same_func() argument 64 if (&next->list != &file->insn_list && next->func == func) in next_insn_same_func() 72 return find_insn(file, func->cfunc->sec, func->cfunc->offset); in next_insn_same_func() 75 #define func_for_each_insn_all(file, func, insn) \ argument 76 for (insn = find_insn(file, func->sec, func->offset); \ 78 insn = next_insn_same_func(file, insn)) [all …]
|
D | check.h | 59 struct instruction *find_insn(struct objtool_file *file, 62 #define for_each_insn(file, insn) \ argument 63 list_for_each_entry(insn, &file->insn_list, list) 65 #define sec_for_each_insn(file, sec, insn) \ argument 66 for (insn = find_insn(file, sec, 0); \ 67 insn && &insn->list != &file->insn_list && \
|
D | orc_gen.c | 13 int create_orc(struct objtool_file *file) in create_orc() argument 17 for_each_insn(file, insn) { in create_orc() 138 int create_orc_sections(struct objtool_file *file) in create_orc_sections() argument 150 sec = find_section_by_name(file->elf, ".orc_unwind"); in create_orc_sections() 158 for_each_sec(file, sec) { in create_orc_sections() 163 sec_for_each_insn(file, sec, insn) { in create_orc_sections() 181 sec = elf_create_section(file->elf, ".orc_unwind_ip", sizeof(int), idx); in create_orc_sections() 185 ip_relasec = elf_create_rela_section(file->elf, sec); in create_orc_sections() 190 u_sec = elf_create_section(file->elf, ".orc_unwind", in create_orc_sections() 195 for_each_sec(file, sec) { in create_orc_sections() [all …]
|
/tools/lib/api/fs/ |
D | tracing_path.c | 75 char *file; in get_tracing_file() local 77 if (asprintf(&file, "%s/%s", tracing_path_mount(), name) < 0) in get_tracing_file() 80 return file; in get_tracing_file() 83 void put_tracing_file(char *file) in put_tracing_file() argument 85 free(file); in put_tracing_file() 90 char *file; in get_events_file() local 92 if (asprintf(&file, "%s/events/%s", tracing_path_mount(), name) < 0) in get_events_file() 95 return file; in get_events_file() 98 void put_events_file(char *file) in put_events_file() argument 100 free(file); in put_events_file()
|
/tools/testing/selftests/vm/ |
D | mlock2.h | 27 FILE *file; in seek_to_smaps_entry() local 37 file = fopen("/proc/self/smaps", "r"); in seek_to_smaps_entry() 38 if (!file) { in seek_to_smaps_entry() 43 while (getline(&line, &size, file) > 0) { in seek_to_smaps_entry() 57 fclose(file); in seek_to_smaps_entry() 58 file = NULL; in seek_to_smaps_entry() 62 return file; in seek_to_smaps_entry()
|
/tools/power/acpi/common/ |
D | cmfsize.c | 29 u32 cm_get_file_size(ACPI_FILE file) in cm_get_file_size() argument 37 current_offset = ftell(file); in cm_get_file_size() 42 status = fseek(file, 0, SEEK_END); in cm_get_file_size() 47 file_size = ftell(file); in cm_get_file_size() 54 status = fseek(file, current_offset, SEEK_SET); in cm_get_file_size()
|
/tools/perf/arch/arm64/util/ |
D | header.c | 23 FILE *file; in get_cpuid_str() local 38 file = fopen(path, "r"); in get_cpuid_str() 39 if (!file) { in get_cpuid_str() 44 if (!fgets(buf, MIDR_SIZE, file)) { in get_cpuid_str() 45 fclose(file); in get_cpuid_str() 48 fclose(file); in get_cpuid_str()
|
/tools/perf/pmu-events/arch/powerpc/ |
D | mapfile.csv | 2 # PVR,Version,JSON/file/pathname,Type 6 # Version could be used to track version of of JSON file 8 # JSON/file/pathname is the path to JSON file, relative 12 # Multiple PVRs could map to a single JSON file.
|
/tools/testing/selftests/powerpc/dscr/ |
D | dscr_sysfs_test.c | 13 static int check_cpu_dscr_default(char *file, unsigned long val) in check_cpu_dscr_default() argument 18 fd = open(file, O_RDWR); in check_cpu_dscr_default() 45 char file[LEN_MAX]; in check_all_cpu_dscr_defaults() local 63 len = snprintf(file, LEN_MAX, "%s%s/dscr", CPU_PATH, dp->d_name); in check_all_cpu_dscr_defaults() 66 if (access(file, F_OK)) in check_all_cpu_dscr_defaults() 69 if (check_cpu_dscr_default(file, val)) { in check_all_cpu_dscr_defaults()
|
/tools/testing/selftests/bpf/prog_tests/ |
D | bpf_verif_scale.c | 18 static int check_load(const char *file, enum bpf_prog_type type) in check_load() argument 25 attr.file = file; in check_load() 35 const char *file; member 102 if (!test__start_subtest(test->file)) in test_bpf_verif_scale() 105 err = check_load(test->file, test->attach_type); in test_bpf_verif_scale()
|
D | queue_stack_map.c | 14 char file[32], buf[128]; in test_queue_stack_map_by_type() local 23 strncpy(file, "./test_queue_map.o", sizeof(file)); in test_queue_stack_map_by_type() 25 strncpy(file, "./test_stack_map.o", sizeof(file)); in test_queue_stack_map_by_type() 29 err = bpf_prog_load(file, BPF_PROG_TYPE_SCHED_CLS, &obj, &prog_fd); in test_queue_stack_map_by_type()
|
/tools/perf/tests/shell/ |
D | trace+probe_vfs_getname.sh | 20 file=$(mktemp /tmp/temporary_file.XXXXX) 24 perf trace -e $evts touch $file 2>&1 | \ 25 …0-9]+\.[0-9]+ ms\): +touch\/[0-9]+ open(at)?\((dfd: +CWD, +)?filename: +${file}, +flags: CREAT\|NO… 41 rm -f ${file}
|
D | record+script_probe_vfs_getname.sh | 19 file=$(mktemp /tmp/temporary_file.XXXXX) 23 perf record -o ${perfdata} -e probe:vfs_getname touch $file 29 … +[0-9]+ +\[[0-9]+\] +[0-9]+\.[0-9]+: +probe:vfs_getname: +\([[:xdigit:]]+\) +pathname=\"${file}\"" 41 rm -f ${file}
|
/tools/testing/selftests/media_tests/ |
D | open_loop_test.sh | 4 file=/dev/media$1 6 echo $file 8 R=$(./media_device_open -d $file);
|
/tools/hv/ |
D | hv_kvp_daemon.c | 419 FILE *file; in kvp_get_os_info() local 442 file = fopen("/etc/os-release", "r"); in kvp_get_os_info() 443 if (file != NULL) { in kvp_get_os_info() 444 while (fgets(buf, sizeof(buf), file)) { in kvp_get_os_info() 487 fclose(file); in kvp_get_os_info() 492 file = fopen("/etc/SuSE-release", "r"); in kvp_get_os_info() 493 if (file != NULL) in kvp_get_os_info() 495 file = fopen("/etc/redhat-release", "r"); in kvp_get_os_info() 496 if (file != NULL) in kvp_get_os_info() 506 p = fgets(buf, sizeof(buf), file); in kvp_get_os_info() [all …]
|
/tools/vm/ |
D | slabinfo-gnuplot.sh | 51 local file=$1 59 check_file_exist "$file" 61 out_file=`basename "$file"` 67 wc_lines=`cat "$file" | wc -l` 94 plot "$file" $range u 2$xtic title 'SIZE' with boxes,\ 107 local file="" 116 file="$file"`basename "$i"` 137 echo "$file.png"
|
/tools/lib/symbol/ |
D | kallsyms.c | 38 FILE *file = fopen(filename, "r"); in kallsyms__parse() local 40 if (file == NULL) in kallsyms__parse() 45 while (!feof(file)) { in kallsyms__parse() 51 line_len = getline(&line, &n, file); in kallsyms__parse() 83 fclose(file); in kallsyms__parse()
|
/tools/perf/pmu-events/arch/nds32/ |
D | mapfile.csv | 2 # MIDR,Version,JSON/file/pathname,Type 7 # Version could be used to track version of of JSON file 9 # JSON/file/pathname is the path to JSON file, relative
|
/tools/perf/tests/ |
D | attr.c | 57 if (1 != fwrite(buf, size, 1, file)) { \ 59 fclose(file); \ 70 FILE *file; in store_event() local 79 file = fopen(path, "w+"); in store_event() 80 if (!file) { in store_event() 85 if (fprintf(file, "[event-%d-%llu-%d]\n", in store_event() 88 fclose(file); in store_event() 142 fclose(file); in store_event()
|