/Linux-v5.4/tools/iio/ |
D | iio_utils.c | 93 char *scan_el_dir, *builtname, *builtname_generic, *filename = 0; in iioutils_get_type() local 123 ret = asprintf(&filename, in iioutils_get_type() 130 sysfsfp = fopen(filename, "r"); in iioutils_get_type() 134 filename); in iioutils_get_type() 167 filename); in iioutils_get_type() 172 free(filename); in iioutils_get_type() 173 filename = 0; in iioutils_get_type() 189 if (filename) in iioutils_get_type() 190 free(filename); in iioutils_get_type() 224 char *filename = NULL; in iioutils_get_param_float() local [all …]
|
D | iio_utils.h | 71 int write_sysfs_int(const char *filename, const char *basedir, int val); 72 int write_sysfs_int_and_verify(const char *filename, const char *basedir, 74 int write_sysfs_string_and_verify(const char *filename, const char *basedir, 76 int write_sysfs_string(const char *filename, const char *basedir, 78 int read_sysfs_posint(const char *filename, const char *basedir); 79 int read_sysfs_float(const char *filename, const char *basedir, float *val); 80 int read_sysfs_string(const char *filename, const char *basedir, char *str);
|
/Linux-v5.4/tools/power/acpi/tools/acpidump/ |
D | apfiles.c | 106 char filename[ACPI_NAMESEG_SIZE + 16]; in ap_write_to_binary_file() local 119 ACPI_COPY_NAMESEG(filename, ACPI_RSDP_NAME); in ap_write_to_binary_file() 121 ACPI_COPY_NAMESEG(filename, table->signature); in ap_write_to_binary_file() 124 filename[0] = (char)tolower((int)filename[0]); in ap_write_to_binary_file() 125 filename[1] = (char)tolower((int)filename[1]); in ap_write_to_binary_file() 126 filename[2] = (char)tolower((int)filename[2]); in ap_write_to_binary_file() 127 filename[3] = (char)tolower((int)filename[3]); in ap_write_to_binary_file() 128 filename[ACPI_NAMESEG_SIZE] = 0; in ap_write_to_binary_file() 134 strcat(filename, instance_str); in ap_write_to_binary_file() 137 strcat(filename, FILE_SUFFIX_BINARY_TABLE); in ap_write_to_binary_file() [all …]
|
/Linux-v5.4/security/tomoyo/ |
D | util.c | 248 char *filename; in tomoyo_parse_name_union() local 255 filename = tomoyo_read_token(param); in tomoyo_parse_name_union() 256 if (!tomoyo_correct_word(filename)) in tomoyo_parse_name_union() 258 ptr->filename = tomoyo_get_name(filename); in tomoyo_parse_name_union() 259 return ptr->filename != NULL; in tomoyo_parse_name_union() 524 bool tomoyo_correct_path(const char *filename) in tomoyo_correct_path() argument 526 return *filename == '/' && tomoyo_correct_word(filename); in tomoyo_correct_path() 612 static int tomoyo_const_part_length(const char *filename) in tomoyo_const_part_length() argument 617 if (!filename) in tomoyo_const_part_length() 619 while ((c = *filename++) != '\0') { in tomoyo_const_part_length() [all …]
|
/Linux-v5.4/samples/mic/mpssd/ |
D | sysfs.c | 17 char filename[PATH_MAX]; in readsysfs() local 24 snprintf(filename, PATH_MAX, "%s/%s", MICSYSFSDIR, entry); in readsysfs() 26 snprintf(filename, PATH_MAX, in readsysfs() 29 fd = open(filename, O_RDONLY); in readsysfs() 32 filename, strerror(errno)); in readsysfs() 39 filename, strerror(errno)); in readsysfs() 59 char filename[PATH_MAX]; in setsysfs() local 64 snprintf(filename, PATH_MAX, "%s/%s", MICSYSFSDIR, entry); in setsysfs() 66 snprintf(filename, PATH_MAX, "%s/%s/%s", in setsysfs() 71 fd = open(filename, O_RDWR); in setsysfs() [all …]
|
/Linux-v5.4/fs/ |
D | utimes.c | 88 long do_utimes(int dfd, const char __user *filename, struct timespec64 *times, in do_utimes() argument 101 if (filename == NULL && dfd != AT_FDCWD) { in do_utimes() 121 error = user_path_at(dfd, filename, lookup_flags, &path); in do_utimes() 137 SYSCALL_DEFINE4(utimensat, int, dfd, const char __user *, filename, in SYSCALL_DEFINE4() argument 153 return do_utimes(dfd, filename, utimes ? tstimes : NULL, flags); in SYSCALL_DEFINE4() 163 static long do_futimesat(int dfd, const char __user *filename, in do_futimesat() argument 188 return do_utimes(dfd, filename, utimes ? tstimes : NULL, 0); in do_futimesat() 192 SYSCALL_DEFINE3(futimesat, int, dfd, const char __user *, filename, in SYSCALL_DEFINE3() argument 195 return do_futimesat(dfd, filename, utimes); in SYSCALL_DEFINE3() 198 SYSCALL_DEFINE2(utimes, char __user *, filename, in SYSCALL_DEFINE2() argument [all …]
|
D | open.c | 348 long do_faccessat(int dfd, const char __user *filename, int mode) in do_faccessat() argument 398 res = user_path_at(dfd, filename, lookup_flags, &path); in do_faccessat() 443 SYSCALL_DEFINE3(faccessat, int, dfd, const char __user *, filename, int, mode) in SYSCALL_DEFINE3() argument 445 return do_faccessat(dfd, filename, mode); in SYSCALL_DEFINE3() 448 SYSCALL_DEFINE2(access, const char __user *, filename, int, mode) in SYSCALL_DEFINE2() argument 450 return do_faccessat(AT_FDCWD, filename, mode); in SYSCALL_DEFINE2() 453 int ksys_chdir(const char __user *filename) in ksys_chdir() argument 459 error = user_path_at(AT_FDCWD, filename, lookup_flags, &path); in ksys_chdir() 479 SYSCALL_DEFINE1(chdir, const char __user *, filename) in SYSCALL_DEFINE1() argument 481 return ksys_chdir(filename); in SYSCALL_DEFINE1() [all …]
|
D | exec.c | 125 struct filename *tmp = getname(library); in SYSCALL_DEFINE1() 839 static struct file *do_open_execat(int fd, struct filename *name, int flags) in do_open_execat() 885 struct filename *filename = getname_kernel(name); in open_exec() local 886 struct file *f = ERR_CAST(filename); in open_exec() 888 if (!IS_ERR(filename)) { in open_exec() 889 f = do_open_execat(AT_FDCWD, filename, 0); in open_exec() 890 putname(filename); in open_exec() 1376 __set_task_comm(current, kbasename(bprm->filename), true); in setup_new_exec() 1432 if (bprm->interp != bprm->filename) in free_bprm() 1440 if (bprm->interp != bprm->filename) in bprm_change_interp() [all …]
|
/Linux-v5.4/scripts/ |
D | headers_check.pl | 31 my $filename; 34 $filename = $file; 36 open(my $fh, '<', $filename) 37 or die "$filename: $!\n"; 62 printf STDERR "$filename:$lineno: included file '$inc' is not exported\n"; 79 printf STDERR "$filename:$lineno: " . 88 printf STDERR "$filename:$lineno: leaks CONFIG_$1 to userspace where it is not valid\n"; 95 if ($filename =~ /types.h|int-l64.h|int-ll64.h/o) { 105 printf STDERR "$filename:$lineno: " . 120 my @file_paths = ($path, $dir . "/" . $path, dirname($filename) . "/" . $path); [all …]
|
D | checkincludes.pl | 60 foreach my $filename (keys %includedfiles) { 61 if ($includedfiles{$filename} > 1) { 62 print "$file: $filename is included more than once.\n"; 75 foreach my $filename (keys %includedfiles) { 76 if ($1 eq $filename) { 77 if ($includedfiles{$filename} > 1) { 78 $includedfiles{$filename}--;
|
D | headerdep.pl | 63 my $filename = shift; 66 my $stripped = $filename; 69 return $stripped if $stripped ne $filename; 72 return $filename; 77 my $filename = shift; 78 return $filename if -f $filename; 81 my $path = "$i/$filename";
|
/Linux-v5.4/arch/xtensa/platforms/iss/ |
D | simdisk.c | 28 const char *filename; member 44 static const char *filename[MAX_SIMDISK_COUNT] = { variable 56 if (n_files < ARRAY_SIZE(filename)) in simdisk_param_set_filename() 57 filename[n_files++] = val; in simdisk_param_set_filename() 66 module_param_cb(filename, &simdisk_param_ops_filename, &n_files, 0); 67 MODULE_PARM_DESC(filename, "Backing storage filename."); 154 static int simdisk_attach(struct simdisk *dev, const char *filename) in simdisk_attach() argument 158 filename = kstrdup(filename, GFP_KERNEL); in simdisk_attach() 159 if (filename == NULL) in simdisk_attach() 168 dev->fd = simc_open(filename, O_RDWR, 0); in simdisk_attach() [all …]
|
/Linux-v5.4/tools/power/cpupower/bench/ |
D | parse.c | 55 char *filename, *filename_tmp; in prepare_output() local 70 filename = malloc(sizeof(char) * len); in prepare_output() 71 if (!filename) { in prepare_output() 78 filename_tmp = realloc(filename, sizeof(*filename) * len); in prepare_output() 81 free(filename); in prepare_output() 86 filename = filename_tmp; in prepare_output() 87 snprintf(filename, len - 1, "%s/benchmark_%s_%s_%li.log", in prepare_output() 90 snprintf(filename, len - 1, "%s/benchmark_%li.log", in prepare_output() 94 dprintf("logfilename: %s\n", filename); in prepare_output() 96 output = fopen(filename, "w+"); in prepare_output() [all …]
|
/Linux-v5.4/tools/perf/examples/bpf/ |
D | etcsnoop.c | 36 struct augmented_filename filename; \ 41 struct augmented_enter_##syscall##_args augmented_args = { .filename.reserved = 0, }; \ 43 augmented_args.filename.size = probe_read_str(&augmented_args.filename.value, \ 44 sizeof(augmented_args.filename.value), \ 46 if (__builtin_memcmp(augmented_args.filename.value, etc, 4) != 0) \ 51 (sizeof(augmented_args) - sizeof(augmented_args.filename.value) + \ 52 augmented_args.filename.size)); \
|
D | augmented_syscalls.c | 40 struct augmented_filename filename; \ 44 struct augmented_enter_##syscall##_args augmented_args = { .filename.reserved = 0, }; \ 47 augmented_args.filename.size = probe_read_str(&augmented_args.filename.value, \ 48 sizeof(augmented_args.filename.value), \ 50 if (augmented_args.filename.size < sizeof(augmented_args.filename.value)) { \ 51 len -= sizeof(augmented_args.filename.value) - augmented_args.filename.size; \ 52 len &= sizeof(augmented_args.filename.value) - 1; \
|
/Linux-v5.4/tools/testing/selftests/kvm/lib/ |
D | elf.c | 16 static void elfhdr_get(const char *filename, Elf64_Ehdr *hdrp) in elfhdr_get() argument 22 fd = open(filename, O_RDONLY); in elfhdr_get() 25 " rv: %i errno: %i", filename, fd, errno); in elfhdr_get() 42 filename, in elfhdr_get() 50 filename, in elfhdr_get() 73 filename, ident[EI_VERSION], EV_CURRENT); in elfhdr_get() 114 void kvm_vm_elf_load(struct kvm_vm *vm, const char *filename, in kvm_vm_elf_load() argument 122 fd = open(filename, O_RDONLY); in kvm_vm_elf_load() 125 " rv: %i errno: %i", filename, fd, errno); in kvm_vm_elf_load() 128 elfhdr_get(filename, &hdr); in kvm_vm_elf_load() [all …]
|
/Linux-v5.4/tools/perf/ |
D | builtin-buildid-cache.c | 117 static int build_id_cache__add_kcore(const char *filename, bool force) in build_id_cache__add_kcore() argument 123 strlcpy(from_dir, filename, sizeof(from_dir)); in build_id_cache__add_kcore() 174 static int build_id_cache__add_file(const char *filename, struct nsinfo *nsi) in build_id_cache__add_file() argument 182 err = filename__read_build_id(filename, &build_id, sizeof(build_id)); in build_id_cache__add_file() 185 pr_debug("Couldn't read a build-id in %s\n", filename); in build_id_cache__add_file() 190 err = build_id_cache__add_s(sbuild_id, filename, nsi, in build_id_cache__add_file() 192 pr_debug("Adding %s %s: %s\n", sbuild_id, filename, in build_id_cache__add_file() 197 static int build_id_cache__remove_file(const char *filename, struct nsinfo *nsi) in build_id_cache__remove_file() argument 206 err = filename__read_build_id(filename, &build_id, sizeof(build_id)); in build_id_cache__remove_file() 209 pr_debug("Couldn't read a build-id in %s\n", filename); in build_id_cache__remove_file() [all …]
|
/Linux-v5.4/samples/bpf/ |
D | test_overhead_user.c | 129 char filename[256]; in main() local 146 snprintf(filename, sizeof(filename), in main() 148 if (load_bpf_file(filename)) { in main() 158 snprintf(filename, sizeof(filename), in main() 160 if (load_bpf_file(filename)) { in main() 170 snprintf(filename, sizeof(filename), in main() 172 if (load_bpf_file(filename)) { in main()
|
D | syscall_tp_user.c | 50 static int test(char *filename, int num_progs) in test() argument 55 if (load_bpf_file(filename)) { in test() 70 fd = open(filename, O_RDONLY); in test() 90 char filename[256]; in main() local 105 snprintf(filename, sizeof(filename), "%s_kern.o", argv[0]); in main() 107 return test(filename, num_progs); in main()
|
/Linux-v5.4/security/integrity/ima/ |
D | ima_api.c | 93 const unsigned char *filename, int pcr) in ima_store_template() argument 121 result = ima_add_template_entry(entry, violation, op, inode, filename); in ima_store_template() 132 void ima_add_violation(struct file *file, const unsigned char *filename, in ima_add_violation() argument 140 .filename = filename, in ima_add_violation() 154 filename, CONFIG_IMA_MEASURE_PCR_IDX); in ima_add_violation() 158 integrity_audit_msg(AUDIT_INTEGRITY_PCR, inode, filename, in ima_add_violation() 212 const char *filename = file->f_path.dentry->d_name.name; in ima_collect_measurement() local 272 filename, "collect_data", audit_cause, in ima_collect_measurement() 294 struct file *file, const unsigned char *filename, in ima_store_measurement() argument 306 .filename = filename, in ima_store_measurement() [all …]
|
/Linux-v5.4/tools/testing/selftests/bpf/ |
D | test_libbpf_open.c | 81 int test_open_file(char *filename, bool verbose) in test_open_file() argument 87 printf("Open BPF ELF-file with libbpf: %s\n", filename); in test_open_file() 90 bpfobj = bpf_object__open(filename); in test_open_file() 97 filename, err_buf); in test_open_file() 113 char filename[1024] = { 0 }; in main() local 141 snprintf(filename, sizeof(filename), "%s", argv[optind]); in main() 143 return test_open_file(filename, verbose); in main()
|
/Linux-v5.4/tools/perf/util/ |
D | srcline.c | 135 const char *filename; member 211 &a2l->filename, &a2l->funcname, in find_address_in_section() 214 if (a2l->filename && !strlen(a2l->filename)) in find_address_in_section() 215 a2l->filename = NULL; in find_address_in_section() 272 if (a2l->filename) in inline_list__append_dso_a2l() 273 srcline = srcline_from_fileline(a2l->filename, a2l->line); in inline_list__append_dso_a2l() 311 while (bfd_find_inliner_info(a2l->abfd, &a2l->filename, in addr2line() 315 if (a2l->filename && !strlen(a2l->filename)) in addr2line() 316 a2l->filename = NULL; in addr2line() 328 *file = a2l->filename ? strdup(a2l->filename) : NULL; in addr2line() [all …]
|
D | build-id.c | 551 char *realname = (char *)name, *filename; in build_id_cache__cachedir() local 560 if (asprintf(&filename, "%s%s%s%s%s", buildid_dir, slash ? "/" : "", in build_id_cache__cachedir() 563 filename = NULL; in build_id_cache__cachedir() 568 return filename; in build_id_cache__cachedir() 648 char *realname = NULL, *filename = NULL, *dir_name = NULL, in build_id_cache__add_s() local 676 if (asprintf(&filename, "%s/%s", dir_name, in build_id_cache__add_s() 679 filename = NULL; in build_id_cache__add_s() 683 if (access(filename, F_OK)) { in build_id_cache__add_s() 685 if (copyfile("/proc/kallsyms", filename)) in build_id_cache__add_s() 688 if (copyfile_ns(name, filename, nsi)) in build_id_cache__add_s() [all …]
|
/Linux-v5.4/drivers/firmware/tegra/ |
D | bpmp-debugfs.c | 76 const char *filename; in get_filename() local 86 filename = dentry_path(file->f_path.dentry, buf, size); in get_filename() 87 if (IS_ERR(filename)) in get_filename() 90 if (strlen(filename) < root_len || in get_filename() 91 strncmp(filename, root_path, root_len)) in get_filename() 94 filename += root_len; in get_filename() 96 return filename; in get_filename() 203 const char *filename; in debugfs_show() local 207 filename = get_filename(bpmp, file, buf, sizeof(buf)); in debugfs_show() 208 if (!filename) in debugfs_show() [all …]
|
/Linux-v5.4/tools/lib/api/fs/ |
D | fs.h | 31 int filename__read_int(const char *filename, int *value); 32 int filename__read_ull(const char *filename, unsigned long long *value); 33 int filename__read_xll(const char *filename, unsigned long long *value); 34 int filename__read_str(const char *filename, char **buf, size_t *sizep); 36 int filename__write_int(const char *filename, int value);
|