/kernel/liteos_a/fs/vfs/operation/ |
H A D | fullpath.c | 146 static int vfs_normalize_path_parame_check(const char *filename, char **pathname) in vfs_normalize_path_parame_check() argument 157 if (filename == NULL) { in vfs_normalize_path_parame_check() 162 namelen = vfs_strnlen(filename, PATH_MAX); in vfs_normalize_path_parame_check() 171 for (name = (char *)filename + namelen; ((name != filename) && (*name != '/')); name--) { in vfs_normalize_path_parame_check() 181 static char *vfs_not_absolute_path(const char *directory, const char *filename, char **pathname, int namelen) in vfs_not_absolute_path() argument 188 if ((namelen > 1) && (filename[0] == '.') && (filename[1] == '/')) { in vfs_not_absolute_path() 189 filename += 2; in vfs_not_absolute_path() 202 "%s/%s", directory, filename); in vfs_not_absolute_path() 213 vfs_normalize_fullpath(const char *directory, const char *filename, char **pathname, int namelen) vfs_normalize_fullpath() argument 244 vfs_normalize_path(const char *directory, const char *filename, char **pathname) vfs_normalize_path() argument 305 vfs_normalize_pathat(int dirfd, const char *filename, char **pathname) vfs_normalize_pathat() argument [all...] |
/kernel/linux/linux-5.10/tools/iio/ |
H A 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 in iioutils_get_param_float() local 322 char *filename; build_channel_array() local 564 char *filename; find_type_by_name() local 648 _write_sysfs_int(const char *filename, const char *basedir, int val, int verify) _write_sysfs_int() argument 725 write_sysfs_int(const char *filename, const char *basedir, int val) write_sysfs_int() argument 739 write_sysfs_int_and_verify(const char *filename, const char *basedir, int val) write_sysfs_int_and_verify() argument 745 _write_sysfs_string(const char *filename, const char *basedir, const char *val, int verify) _write_sysfs_string() argument 825 write_sysfs_string_and_verify(const char *filename, const char *basedir, const char *val) write_sysfs_string_and_verify() argument 839 write_sysfs_string(const char *filename, const char *basedir, const char *val) write_sysfs_string() argument 853 read_sysfs_posint(const char *filename, const char *basedir) read_sysfs_posint() argument 900 read_sysfs_float(const char *filename, const char *basedir, float *val) read_sysfs_float() argument 947 read_sysfs_string(const char *filename, const char *basedir, char *str) read_sysfs_string() argument [all...] |
/kernel/linux/linux-6.6/tools/iio/ |
H A D | iio_utils.c | 95 char *scan_el_dir, *builtname, *builtname_generic, *filename = 0; in iioutils_get_type() local 125 ret = asprintf(&filename, in iioutils_get_type() 132 sysfsfp = fopen(filename, "r"); in iioutils_get_type() 136 filename); in iioutils_get_type() 169 filename); in iioutils_get_type() 174 free(filename); in iioutils_get_type() 175 filename = 0; in iioutils_get_type() 191 if (filename) in iioutils_get_type() 192 free(filename); in iioutils_get_type() 226 char *filename in iioutils_get_param_float() local 325 char *filename; build_channel_array() local 568 char *filename; find_type_by_name() local 652 _write_sysfs_int(const char *filename, const char *basedir, int val, int verify) _write_sysfs_int() argument 729 write_sysfs_int(const char *filename, const char *basedir, int val) write_sysfs_int() argument 743 write_sysfs_int_and_verify(const char *filename, const char *basedir, int val) write_sysfs_int_and_verify() argument 749 _write_sysfs_string(const char *filename, const char *basedir, const char *val, int verify) _write_sysfs_string() argument 829 write_sysfs_string_and_verify(const char *filename, const char *basedir, const char *val) write_sysfs_string_and_verify() argument 843 write_sysfs_string(const char *filename, const char *basedir, const char *val) write_sysfs_string() argument 857 read_sysfs_posint(const char *filename, const char *basedir) read_sysfs_posint() argument 904 read_sysfs_float(const char *filename, const char *basedir, float *val) read_sysfs_float() argument 951 read_sysfs_string(const char *filename, const char *basedir, char *str) read_sysfs_string() argument [all...] |
/kernel/linux/linux-5.10/tools/power/acpi/tools/acpidump/ |
H A D | apfiles.c | 20 * PARAMETERS: pathname - Output filename 56 * PARAMETERS: pathname - Output filename 100 * filename from the table signature. 106 char filename[ACPI_NAMESEG_SIZE + 16]; in ap_write_to_binary_file() local 116 /* Construct lower-case filename from the table local signature */ in ap_write_to_binary_file() 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[ in ap_write_to_binary_file() [all...] |
/kernel/linux/linux-6.6/tools/power/acpi/tools/acpidump/ |
H A D | apfiles.c | 20 * PARAMETERS: pathname - Output filename 56 * PARAMETERS: pathname - Output filename 100 * filename from the table signature. 106 char filename[ACPI_NAMESEG_SIZE + 16]; in ap_write_to_binary_file() local 116 /* Construct lower-case filename from the table local signature */ in ap_write_to_binary_file() 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[ in ap_write_to_binary_file() [all...] |
/kernel/liteos_m/components/shell/src/cmds/ |
H A D | fullpath.c | 135 STATIC INT32 VfsNormalizePathParameCheck(const CHAR *filename, CHAR **pathname) in VfsNormalizePathParameCheck() argument 146 if (filename == NULL) { in VfsNormalizePathParameCheck() 151 namelen = VfsStrnlen(filename, PATH_MAX); in VfsNormalizePathParameCheck() 160 for (name = (CHAR *)filename + namelen; ((name != filename) && (*name != '/')); name--) { in VfsNormalizePathParameCheck() 170 STATIC CHAR *VfsNotAbsolutePath(const CHAR *directory, const CHAR *filename, CHAR **pathname, INT32 namelen) in VfsNotAbsolutePath() argument 177 if ((namelen > 1) && (filename[0] == '.') && (filename[1] == '/')) { in VfsNotAbsolutePath() 178 filename += 2; /* 2, size of "./" */ in VfsNotAbsolutePath() 190 "%s/%s", directory, filename); in VfsNotAbsolutePath() 201 VfsNormalizeFullpath(const CHAR *directory, const CHAR *filename, CHAR **pathname, INT32 namelen) VfsNormalizeFullpath() argument 232 VfsNormalizePath(const CHAR *directory, const CHAR *filename, CHAR **pathname) VfsNormalizePath() argument [all...] |
H A D | vfs_shellcmd.c | 221 const CHAR *filename = NULL; in OsShellCmdLs() local 235 filename = argv[0]; in OsShellCmdLs() 236 ret = VfsNormalizePath(shellWorkingDirectory, filename, &fullpath); in OsShellCmdLs() 309 const CHAR *filename = NULL; in OsShellCmdMkdir() local 317 filename = argv[0]; in OsShellCmdMkdir() 318 ret = VfsNormalizePath(shellWorkingDirectory, filename, &fullpath); in OsShellCmdMkdir() 356 const CHAR *filename = NULL; in OsShellCmdTouch() local 364 filename = argv[0]; in OsShellCmdTouch() 365 ret = VfsNormalizePath(shellWorkingDirectory, filename, &fullpath); in OsShellCmdTouch() 390 const CHAR *filename in OsShellCmdDoCp() local 570 OsWildcardMatch(const CHAR *src, const CHAR *filename) OsWildcardMatch() argument 618 OsIsContainersWildcard(const CHAR *filename) OsIsContainersWildcard() argument 905 const CHAR *filename = NULL; OsShellCmdRm() local 948 const CHAR *filename = NULL; OsShellCmdRmdir() local [all...] |
/kernel/linux/linux-5.10/security/tomoyo/ |
H A D | util.c | 146 static bool tomoyo_correct_path2(const char *filename, const size_t len); 250 char *filename; in tomoyo_parse_name_union() local 257 filename = tomoyo_read_token(param); in tomoyo_parse_name_union() 258 if (!tomoyo_correct_word(filename)) in tomoyo_parse_name_union() 260 ptr->filename = tomoyo_get_name(filename); in tomoyo_parse_name_union() 261 return ptr->filename != NULL; in tomoyo_parse_name_union() 521 * @filename: The pathname to check. 522 * @len: Length of @filename. 524 * Returns true if @filename follow 526 tomoyo_correct_path2(const char *filename, const size_t len) tomoyo_correct_path2() argument 542 tomoyo_correct_path(const char *filename) tomoyo_correct_path() argument 630 tomoyo_const_part_length(const char *filename) tomoyo_const_part_length() argument 693 tomoyo_file_matches_pattern2(const char *filename, const char *filename_end, const char *pattern, const char *pattern_end) tomoyo_file_matches_pattern2() argument 812 tomoyo_file_matches_pattern(const char *filename, const char *filename_end, const char *pattern, const char *pattern_end) tomoyo_file_matches_pattern() argument 932 tomoyo_path_matches_pattern(const struct tomoyo_path_info *filename, const struct tomoyo_path_info *pattern) tomoyo_path_matches_pattern() argument [all...] |
/kernel/linux/linux-6.6/security/tomoyo/ |
H A D | util.c | 146 static bool tomoyo_correct_path2(const char *filename, const size_t len); 250 char *filename; in tomoyo_parse_name_union() local 257 filename = tomoyo_read_token(param); in tomoyo_parse_name_union() 258 if (!tomoyo_correct_word(filename)) in tomoyo_parse_name_union() 260 ptr->filename = tomoyo_get_name(filename); in tomoyo_parse_name_union() 261 return ptr->filename != NULL; in tomoyo_parse_name_union() 526 * @filename: The pathname to check. 527 * @len: Length of @filename. 529 * Returns true if @filename follow 531 tomoyo_correct_path2(const char *filename, const size_t len) tomoyo_correct_path2() argument 547 tomoyo_correct_path(const char *filename) tomoyo_correct_path() argument 635 tomoyo_const_part_length(const char *filename) tomoyo_const_part_length() argument 698 tomoyo_file_matches_pattern2(const char *filename, const char *filename_end, const char *pattern, const char *pattern_end) tomoyo_file_matches_pattern2() argument 817 tomoyo_file_matches_pattern(const char *filename, const char *filename_end, const char *pattern, const char *pattern_end) tomoyo_file_matches_pattern() argument 937 tomoyo_path_matches_pattern(const struct tomoyo_path_info *filename, const struct tomoyo_path_info *pattern) tomoyo_path_matches_pattern() argument [all...] |
/kernel/linux/linux-5.10/arch/xtensa/platforms/iss/ |
H A 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."); 153 static int simdisk_attach(struct simdisk *dev, const char *filename) in simdisk_attach() argument 157 filename = kstrdup(filename, GFP_KERNE in simdisk_attach() [all...] |
/kernel/linux/linux-5.10/fs/ |
H A D | utimes.c | 78 static int do_utimes_path(int dfd, const char __user *filename, in do_utimes_path() argument 93 error = user_path_at(dfd, filename, lookup_flags, &path); in do_utimes_path() 124 * do_utimes - change times on filename or file descriptor 126 * @filename: path name or NULL 130 * If filename is NULL and dfd refers to an open file, then operate on 131 * the file. Otherwise look up filename, possibly using dfd as a 138 long do_utimes(int dfd, const char __user *filename, struct timespec64 *times, in do_utimes() argument 141 if (filename == NULL && dfd != AT_FDCWD) in do_utimes() 143 return do_utimes_path(dfd, filename, times, flags); in do_utimes() 146 SYSCALL_DEFINE4(utimensat, int, dfd, const char __user *, filename, in SYSCALL_DEFINE4() 172 do_futimesat(int dfd, const char __user *filename, struct __kernel_old_timeval __user *utimes) do_futimesat() argument 266 do_compat_futimesat(unsigned int dfd, const char __user *filename, struct old_timeval32 __user *t) do_compat_futimesat() argument [all...] |
/kernel/linux/linux-6.6/fs/ |
H A D | utimes.c | 80 static int do_utimes_path(int dfd, const char __user *filename, in do_utimes_path() argument 95 error = user_path_at(dfd, filename, lookup_flags, &path); in do_utimes_path() 126 * do_utimes - change times on filename or file descriptor 128 * @filename: path name or NULL 132 * If filename is NULL and dfd refers to an open file, then operate on 133 * the file. Otherwise look up filename, possibly using dfd as a 140 long do_utimes(int dfd, const char __user *filename, struct timespec64 *times, in do_utimes() argument 143 if (filename == NULL && dfd != AT_FDCWD) in do_utimes() 145 return do_utimes_path(dfd, filename, times, flags); in do_utimes() 148 SYSCALL_DEFINE4(utimensat, int, dfd, const char __user *, filename, in SYSCALL_DEFINE4() 174 do_futimesat(int dfd, const char __user *filename, struct __kernel_old_timeval __user *utimes) do_futimesat() argument 268 do_compat_futimesat(unsigned int dfd, const char __user *filename, struct old_timeval32 __user *t) do_compat_futimesat() argument [all...] |
/kernel/linux/linux-6.6/arch/xtensa/platforms/iss/ |
H A D | simdisk.c | 28 const char *filename; member 43 static const char *filename[MAX_SIMDISK_COUNT] = { variable 55 if (n_files < ARRAY_SIZE(filename)) in simdisk_param_set_filename() 56 filename[n_files++] = val; in simdisk_param_set_filename() 65 module_param_cb(filename, &simdisk_param_ops_filename, &n_files, 0); 66 MODULE_PARM_DESC(filename, "Backing storage filename."); 151 static int simdisk_attach(struct simdisk *dev, const char *filename) in simdisk_attach() argument 155 filename = kstrdup(filename, GFP_KERNE in simdisk_attach() [all...] |
/kernel/linux/linux-6.6/arch/um/kernel/ |
H A D | load_file.c | 10 static int __init __uml_load_file(const char *filename, void *buf, int size) in __uml_load_file() argument 14 fd = os_open_file(filename, of_read(OPENFLAGS()), 0); in __uml_load_file() 16 printk(KERN_ERR "Opening '%s' failed - err = %d\n", filename, in __uml_load_file() 24 filename, -n); in __uml_load_file() 32 void *uml_load_file(const char *filename, unsigned long long *size) in uml_load_file() argument 39 if (!filename) in uml_load_file() 42 err = os_file_size(filename, size); in uml_load_file() 47 printk(KERN_ERR "\"%s\" is empty\n", filename); in uml_load_file() 55 if (__uml_load_file(filename, area, *size)) { in uml_load_file()
|
/kernel/linux/linux-6.6/tools/perf/tests/ |
H A D | symbols.c | 44 static void get_test_dso_filename(char *filename, size_t max_sz) in get_test_dso_filename() argument 47 strlcpy(filename, dso_to_test, max_sz); in get_test_dso_filename() 49 perf_exe(filename, max_sz); in get_test_dso_filename() 52 static int create_map(struct test_info *ti, char *filename, struct map **map_p) in create_map() argument 56 PROT_EXEC, 0, NULL, filename, ti->thread); in create_map() 100 static int test_file(struct test_info *ti, char *filename) in test_file() argument 106 pr_debug("Testing %s\n", filename); in test_file() 108 ret = create_map(ti, filename, &map); in test_file() 135 char filename[PATH_MAX]; in test__symbols() local 143 get_test_dso_filename(filename, sizeo in test__symbols() [all...] |
H A D | builtin-test-list.c | 65 char filename[PATH_MAX]; in shell_test__description() local 68 path__join(filename, sizeof(filename), path, name); in shell_test__description() 69 fp = fopen(filename, "r"); in shell_test__description() 103 char filename[PATH_MAX]; in is_test_script() local 105 path__join(filename, sizeof(filename), path, name); in is_test_script() 106 if (!is_shell_script(filename)) return false; in is_test_script() 162 char filename[PATH_MAX]; in append_scripts_in_dir() local 179 path__join(filename, sizeo in append_scripts_in_dir() [all...] |
/kernel/linux/linux-5.10/tools/power/cpupower/bench/ |
H A 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() [all...] |
/kernel/linux/linux-6.6/tools/power/cpupower/bench/ |
H A 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() [all...] |
/kernel/liteos_a/fs/vfs/vfs_cmd/ |
H A D | vfs_shellcmd.c | 129 const char *filename = NULL; in osShellCmdLs() local 143 filename = argv[0]; in osShellCmdLs() 144 ret = vfs_normalize_path(shell_working_directory, filename, &fullpath); in osShellCmdLs() 303 const char *filename = NULL; in osShellCmdMount() local 322 filename = argv[2]; // 2: index of file path in osShellCmdMount() 323 ret = vfs_normalize_path(shell_working_directory, filename, &fullpath); in osShellCmdMount() 359 filename = argv[1]; in osShellCmdMount() 360 ret = vfs_normalize_path(shell_working_directory, filename, &fullpath); in osShellCmdMount() 407 const char *filename = NULL; in osShellCmdUmount() local 420 filename in osShellCmdUmount() 452 const char *filename = NULL; osShellCmdMkdir() local 518 const char *filename = NULL; osShellCmdStatfs() local 557 const char *filename = NULL; osShellCmdTouch() local 591 const char *filename = NULL; os_shell_cmd_do_cp() local 786 os_wildcard_match(const char *src, const char *filename) os_wildcard_match() argument 835 os_is_containers_wildcard(const char *filename) os_is_containers_wildcard() argument 1103 const char *filename = NULL; osShellCmdRm() local 1145 const char *filename = NULL; osShellCmdRmdir() local 1241 const char *filename = NULL; osShellCmdChmod() local 1285 const char *filename = NULL; osShellCmdChown() local 1336 const char *filename = NULL; osShellCmdChgrp() local [all...] |
/kernel/linux/linux-5.10/tools/perf/examples/bpf/ |
H A D | etcsnoop.c | 3 * Augment the filename syscalls with the contents of the filename pointer argument 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 [all...] |
/kernel/linux/linux-5.10/tools/testing/selftests/kvm/lib/ |
H A 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() 24 " filename: %s\n" in elfhdr_get() 25 " rv: %i errno: %i", filename, fd, errno); in elfhdr_get() 39 " filename: %s\n" in elfhdr_get() 42 filename, in elfhdr_get() 47 " filename: %s\n" in elfhdr_get() 50 filename, in elfhdr_get() 70 " filename: %s\n" in elfhdr_get() 73 filename, iden in elfhdr_get() 114 kvm_vm_elf_load(struct kvm_vm *vm, const char *filename, uint32_t data_memslot, uint32_t pgd_memslot) kvm_vm_elf_load() argument [all...] |
/kernel/linux/linux-6.6/tools/testing/selftests/kvm/lib/ |
H A D | elf.c | 15 static void elfhdr_get(const char *filename, Elf64_Ehdr *hdrp) in elfhdr_get() argument 21 fd = open(filename, O_RDONLY); in elfhdr_get() 23 " filename: %s\n" in elfhdr_get() 24 " rv: %i errno: %i", filename, fd, errno); in elfhdr_get() 38 " filename: %s\n" in elfhdr_get() 41 filename, in elfhdr_get() 46 " filename: %s\n" in elfhdr_get() 49 filename, in elfhdr_get() 69 " filename: %s\n" in elfhdr_get() 72 filename, iden in elfhdr_get() 114 kvm_vm_elf_load(struct kvm_vm *vm, const char *filename) kvm_vm_elf_load() argument [all...] |
/kernel/linux/linux-6.6/io_uring/ |
H A D | statx.c | 19 struct filename *filename; member 39 sx->filename = getname_flags(path, in io_statx_prep() 43 if (IS_ERR(sx->filename)) { in io_statx_prep() 44 int ret = PTR_ERR(sx->filename); in io_statx_prep() 46 sx->filename = NULL; in io_statx_prep() 62 ret = do_statx(sx->dfd, sx->filename, sx->flags, sx->mask, sx->buffer); in io_statx() 71 if (sx->filename) in io_statx_cleanup() 72 putname(sx->filename); in io_statx_cleanup()
|
H A D | fs.c | 22 struct filename *oldpath; 23 struct filename *newpath; 31 struct filename *filename; member 38 struct filename *filename; member 45 struct filename *oldpath; 46 struct filename *newpath; 121 un->filename = getname(fname); in io_unlinkat_prep() 122 if (IS_ERR(un->filename)) in io_unlinkat_prep() [all...] |
/kernel/linux/build/ |
H A D | kernel_build.py | 42 def normpath(self, filename): 43 if re.search("^[\.]+[^/]", filename): 44 filename = re.sub("^[\.]+", "", filename) 45 return os.path.normpath(filename) 55 def report_build_warning(self, filename, regex, details): 58 if len(details) == 0 or filename is None: 61 if not os.path.exists(os.path.join(self.path, filename)): 72 'title': self.format_title("%s: %s" % (filename, warning)), 73 'filename' [all...] |