Home
last modified time | relevance | path

Searched refs:namelen (Results 1 – 25 of 207) sorted by relevance

123456789

/kernel/liteos_m/components/shell/src/cmds/
Dfullpath.c137 INT32 namelen; in VfsNormalizePathParameCheck() local
151 namelen = VfsStrnlen(filename, PATH_MAX); in VfsNormalizePathParameCheck()
152 if (!namelen) { in VfsNormalizePathParameCheck()
155 } else if (namelen >= PATH_MAX) { in VfsNormalizePathParameCheck()
160 for (name = (CHAR *)filename + namelen; ((name != filename) && (*name != '/')); name--) { in VfsNormalizePathParameCheck()
167 return namelen; in VfsNormalizePathParameCheck()
170 …AR *VfsNotAbsolutePath(const CHAR *directory, const CHAR *filename, CHAR **pathname, INT32 namelen) in VfsNotAbsolutePath() argument
177 if ((namelen > 1) && (filename[0] == '.') && (filename[1] == '/')) { in VfsNotAbsolutePath()
181 fullpath = (CHAR *)malloc(strlen(directory) + namelen + 2); /* 2, size of "./" */ in VfsNotAbsolutePath()
189 ret = snprintf_s(fullpath, strlen(directory) + namelen + 2, strlen(directory) + namelen + 1, in VfsNotAbsolutePath()
[all …]
/kernel/liteos_a/fs/vfs/operation/
Dfullpath.c148 int namelen; in vfs_normalize_path_parame_check() local
162 namelen = vfs_strnlen(filename, PATH_MAX); in vfs_normalize_path_parame_check()
163 if (!namelen) { in vfs_normalize_path_parame_check()
166 } else if (namelen >= PATH_MAX) { in vfs_normalize_path_parame_check()
171 for (name = (char *)filename + namelen; ((name != filename) && (*name != '/')); name--) { in vfs_normalize_path_parame_check()
178 return namelen; in vfs_normalize_path_parame_check()
181 …r *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()
192 fullpath = (char *)malloc(strlen(directory) + namelen + 2); in vfs_not_absolute_path()
201 ret = snprintf_s(fullpath, strlen(directory) + namelen + 2, strlen(directory) + namelen + 1, in vfs_not_absolute_path()
[all …]
/kernel/linux/linux-5.10/drivers/xen/xenfs/
Dxensyms.c19 uint32_t namelen; member
29 memset(xs->name, 0, xs->namelen); in xensyms_next_sym()
30 symdata->namelen = xs->namelen; in xensyms_next_sym()
42 if (unlikely(symdata->namelen > xs->namelen)) { in xensyms_next_sym()
45 xs->namelen = symdata->namelen; in xensyms_next_sym()
46 xs->name = kzalloc(xs->namelen, GFP_KERNEL); in xensyms_next_sym()
125 xs->namelen = XEN_KSYM_NAME_LEN + 1; in xensyms_open()
126 xs->name = kzalloc(xs->namelen, GFP_KERNEL); in xensyms_open()
133 xs->op.u.symdata.namelen = xs->namelen; in xensyms_open()
/kernel/linux/linux-5.10/net/dns_resolver/
Ddns_query.c75 const char *type, const char *name, size_t namelen, in dns_query() argument
87 type, (int)namelen, (int)namelen, name, namelen, options); in dns_query()
89 if (!name || namelen == 0) in dns_query()
102 if (namelen < 3 || namelen > 255) in dns_query()
104 desclen += namelen + 1; in dns_query()
116 memcpy(cp, name, namelen); in dns_query()
117 cp += namelen; in dns_query()
/kernel/liteos_a/syscall/
Dnet_syscall.c78 int SysBind(int s, const struct sockaddr *name, socklen_t namelen) in SysBind() argument
83 CHECK_ASPACE(name, namelen); in SysBind()
85 DUP_FROM_USER(name, namelen); in SysBind()
91 ret = bind(s, name, namelen); in SysBind()
101 int SysConnect(int s, const struct sockaddr *name, socklen_t namelen) in SysConnect() argument
106 CHECK_ASPACE(name, namelen); in SysConnect()
108 DUP_FROM_USER(name, namelen); in SysConnect()
114 ret = connect(s, name, namelen); in SysConnect()
164 int SysGetSockName(int s, struct sockaddr *name, socklen_t *namelen) in SysGetSockName() argument
170 CHECK_ASPACE(namelen, sizeof(socklen_t)); in SysGetSockName()
[all …]
/kernel/liteos_a/compat/posix/src/
Dsocket.c48 int bind(int s, const struct sockaddr *name, socklen_t namelen) in bind() argument
51 if (namelen < sizeof(*name)) { in bind()
55 return lwip_bind(s, name, namelen); in bind()
63 int getpeername(int s, struct sockaddr *name, socklen_t *namelen) in getpeername() argument
66 CHECK_NULL_PTR(namelen); in getpeername()
67 return lwip_getpeername(s, name, namelen); in getpeername()
70 int getsockname(int s, struct sockaddr *name, socklen_t *namelen) in getsockname() argument
73 CHECK_NULL_PTR(namelen); in getsockname()
74 return lwip_getsockname(s, name, namelen); in getsockname()
92 int connect(int s, const struct sockaddr *name, socklen_t namelen) in connect() argument
[all …]
/kernel/linux/linux-5.10/fs/ocfs2/dlm/
Ddlmmaster.c58 unsigned int namelen) in dlm_mle_equal() argument
63 if (namelen != mle->mnamelen || in dlm_mle_equal()
64 memcmp(name, mle->mname, namelen) != 0) in dlm_mle_equal()
80 unsigned int namelen);
85 char *name, unsigned int namelen);
103 const char *name, unsigned int namelen,
255 unsigned int namelen) in dlm_init_mle() argument
286 memcpy(mle->mname, name, namelen); in dlm_init_mle()
287 mle->mnamelen = namelen; in dlm_init_mle()
288 mle->mnamehash = dlm_lockid_hash(name, namelen); in dlm_init_mle()
[all …]
/kernel/linux/linux-5.10/fs/xfs/
Dxfs_xattr.c28 .namelen = strlen(name), in xfs_xattr_get()
50 .namelen = strlen(name), in xfs_xattr_set()
100 int namelen) in __xfs_xattr_put_listent() argument
111 arraytop = context->count + prefix_len + namelen + 1; in __xfs_xattr_put_listent()
120 strncpy(offset, (char *)name, namelen); /* real name */ in __xfs_xattr_put_listent()
121 offset += namelen; in __xfs_xattr_put_listent()
125 context->count += prefix_len + namelen + 1; in __xfs_xattr_put_listent()
134 int namelen, in xfs_xattr_put_listent() argument
144 if (namelen == SGI_ACL_FILE_SIZE && in xfs_xattr_put_listent()
152 } else if (namelen == SGI_ACL_DEFAULT_SIZE && in xfs_xattr_put_listent()
[all …]
Dxfs_attr_list.c86 sfe->namelen))) in xfs_attr_shortform_list()
91 (int)sfe->namelen, in xfs_attr_shortform_list()
133 sbp->hash = xfs_da_hashname(sfe->nameval, sfe->namelen); in xfs_attr_shortform_list()
135 sbp->namelen = sfe->namelen; in xfs_attr_shortform_list()
178 sbp->namelen))) { in xfs_attr_shortform_list()
185 sbp->namelen, in xfs_attr_shortform_list()
440 int namelen, valuelen; in xfs_attr3_leaf_list_int() local
456 namelen = name_loc->namelen; in xfs_attr3_leaf_list_int()
463 namelen = name_rmt->namelen; in xfs_attr3_leaf_list_int()
468 !xfs_attr_namecheck(name, namelen))) in xfs_attr3_leaf_list_int()
[all …]
/kernel/linux/linux-5.10/fs/jffs2/
Dwrite.c207 uint32_t namelen, int alloc_mode) in jffs2_write_dirent() argument
226 if (strnlen(name, namelen) != namelen) { in jffs2_write_dirent()
240 vecs[1].iov_len = namelen; in jffs2_write_dirent()
242 fd = jffs2_alloc_full_dirent(namelen+1); in jffs2_write_dirent()
248 fd->nhash = full_name_hash(NULL, name, namelen); in jffs2_write_dirent()
250 memcpy(fd->name, name, namelen); in jffs2_write_dirent()
251 fd->name[namelen]=0; in jffs2_write_dirent()
270 if (ret || (retlen != sizeof(*rd) + namelen)) { in jffs2_write_dirent()
272 sizeof(*rd) + namelen, flash_ofs, ret, retlen); in jffs2_write_dirent()
275 jffs2_add_physical_node_ref(c, flash_ofs | REF_OBSOLETE, PAD(sizeof(*rd)+namelen), NULL); in jffs2_write_dirent()
[all …]
Ddir.c288 int namelen; in jffs2_symlink() local
307 namelen = dentry->d_name.len; in jffs2_symlink()
379 ret = jffs2_reserve_space(c, sizeof(*rd)+namelen, &alloclen, in jffs2_symlink()
380 ALLOC_NORMAL, JFFS2_SUMMARY_DIRENT_SIZE(namelen)); in jffs2_symlink()
397 rd->totlen = cpu_to_je32(sizeof(*rd) + namelen); in jffs2_symlink()
404 rd->nsize = namelen; in jffs2_symlink()
407 rd->name_crc = cpu_to_je32(crc32(0, dentry->d_name.name, namelen)); in jffs2_symlink()
409 fd = jffs2_write_dirent(c, dir_f, rd, dentry->d_name.name, namelen, ALLOC_NORMAL); in jffs2_symlink()
450 int namelen; in jffs2_mkdir() local
465 namelen = dentry->d_name.len; in jffs2_mkdir()
[all …]
/kernel/linux/linux-5.10/fs/xfs/libxfs/
Dxfs_dir2_sf.c62 return (void *)sfep + xfs_dir2_sf_entsize(mp, hdr, sfep->namelen); in xfs_dir2_sf_nextentry()
77 uint8_t *from = sfep->name + sfep->namelen; in xfs_dir2_sf_get_ino()
94 uint8_t *to = sfep->name + sfep->namelen; in xfs_dir2_sf_put_ino()
139 uint8_t ftype = sfep->name[sfep->namelen]; in xfs_dir2_sf_get_ftype()
157 sfep->name[sfep->namelen] = ftype; in xfs_dir2_sf_put_ftype()
182 int namelen; /* total name bytes */ in xfs_dir2_block_sfsize() local
197 count = i8count = namelen = 0; in xfs_dir2_block_sfsize()
217 isdot = dep->namelen == 1 && dep->name[0] == '.'; in xfs_dir2_block_sfsize()
219 dep->namelen == 2 && in xfs_dir2_block_sfsize()
228 namelen += dep->namelen + has_ftype; in xfs_dir2_block_sfsize()
[all …]
/kernel/linux/linux-5.10/fs/efs/
Ddir.c65 int namelen; in efs_readdir() local
73 namelen = dirslot->namelen; in efs_readdir()
77 inodenum, nameptr, namelen); in efs_readdir()
78 if (!namelen) in efs_readdir()
84 if (nameptr - (char *) dirblock + namelen > EFS_DIRBSIZE) { in efs_readdir()
91 if (!dir_emit(ctx, nameptr, namelen, inodenum, DT_UNKNOWN)) { in efs_readdir()
/kernel/linux/linux-5.10/fs/dlm/
Ddir.c66 uint16_t namelen; in dlm_recover_directory() local
114 namelen = be16_to_cpu(v); in dlm_recover_directory()
122 if (namelen == 0xFFFF) in dlm_recover_directory()
124 if (!namelen) in dlm_recover_directory()
127 if (namelen > left) in dlm_recover_directory()
130 if (namelen > DLM_RESNAME_MAXLEN) in dlm_recover_directory()
134 b, namelen, in dlm_recover_directory()
157 b, namelen); in dlm_recover_directory()
175 last_len = namelen; in dlm_recover_directory()
176 memcpy(last_name, b, namelen); in dlm_recover_directory()
[all …]
/kernel/linux/linux-5.10/fs/nfs/
Ddns_resolve.c18 ssize_t nfs_dns_resolve_name(struct net *net, char *name, size_t namelen, in nfs_dns_resolve_name() argument
25 ip_len = dns_query(net, NULL, name, namelen, NULL, &ip_addr, NULL, in nfs_dns_resolve_name()
64 size_t namelen; member
95 new->hostname = kmemdup_nul(key->hostname, key->namelen, GFP_KERNEL); in nfs_dns_ent_init()
97 new->namelen = key->namelen; in nfs_dns_ent_init()
100 new->namelen = 0; in nfs_dns_ent_init()
128 item->namelen = 0; in nfs_dns_ent_alloc()
172 if (a->namelen == 0 || a->namelen != b->namelen) in nfs_dns_match()
174 return memcmp(a->hostname, b->hostname, a->namelen) == 0; in nfs_dns_match()
254 key.namelen = len; in nfs_dns_parse()
[all …]
Dnfs4idmap.c165 int nfs_map_string_to_numeric(const char *name, size_t namelen, __u32 *res) in nfs_map_string_to_numeric() argument
170 if (memchr(name, '@', namelen) != NULL || namelen >= sizeof(buf)) in nfs_map_string_to_numeric()
172 memcpy(buf, name, namelen); in nfs_map_string_to_numeric()
173 buf[namelen] = '\0'; in nfs_map_string_to_numeric()
258 static ssize_t nfs_idmap_get_desc(const char *name, size_t namelen, in nfs_idmap_get_desc() argument
262 size_t desclen = typelen + namelen + 2; in nfs_idmap_get_desc()
273 memcpy(cp, name, namelen); in nfs_idmap_get_desc()
274 cp += namelen; in nfs_idmap_get_desc()
279 static struct key *nfs_idmap_request_key(const char *name, size_t namelen, in nfs_idmap_request_key() argument
286 ret = nfs_idmap_get_desc(name, namelen, type, strlen(type), &desc); in nfs_idmap_request_key()
[all …]
Dnamespace.c56 int namelen; in nfs_path() local
75 namelen = dentry->d_name.len; in nfs_path()
76 buflen -= namelen + 1; in nfs_path()
79 end -= namelen; in nfs_path()
80 memcpy(end, dentry->d_name.name, namelen); in nfs_path()
106 namelen = strlen(base); in nfs_path()
109 while (namelen > 0 && base[namelen - 1] == '/') in nfs_path()
110 namelen--; in nfs_path()
112 buflen -= namelen; in nfs_path()
118 end -= namelen; in nfs_path()
[all …]
/kernel/linux/linux-5.10/fs/omfs/
Ddir.c12 static int omfs_hash(const char *name, int namelen, int mod) in omfs_hash() argument
15 for (i = 0; i < namelen; i++) in omfs_hash()
25 const char *name, int namelen, int *ofs) in omfs_get_bucket() argument
28 int bucket = omfs_hash(name, namelen, nbuckets); in omfs_get_bucket()
35 const char *name, int namelen, in omfs_scan_list() argument
56 if (strncmp(oi->i_name, name, namelen) == 0) in omfs_scan_list()
68 const char *name, int namelen) in omfs_find_entry() argument
74 bh = omfs_get_bucket(dir, name, namelen, &ofs); in omfs_find_entry()
81 return omfs_scan_list(dir, block, name, namelen, &dummy); in omfs_find_entry()
115 int namelen = dentry->d_name.len; in omfs_add_link() local
[all …]
/kernel/linux/linux-5.10/scripts/dtc/libfdt/
Dfdt_ro.c226 const char *name, int namelen) in fdt_subnode_offset_namelen() argument
236 && fdt_nodename_eq_(fdt, offset, name, namelen)) in fdt_subnode_offset_namelen()
250 int fdt_path_offset_namelen(const void *fdt, const char *path, int namelen) in fdt_path_offset_namelen() argument
252 const char *end = path + namelen; in fdt_path_offset_namelen()
397 int namelen, in fdt_get_property_namelen_() argument
412 name, namelen)) { in fdt_get_property_namelen_()
428 int namelen, int *lenp) in fdt_get_property_namelen() argument
438 return fdt_get_property_namelen_(fdt, offset, name, namelen, lenp, in fdt_get_property_namelen()
452 const char *name, int namelen, int *lenp) in fdt_getprop_namelen() argument
457 prop = fdt_get_property_namelen_(fdt, nodeoffset, name, namelen, lenp, in fdt_getprop_namelen()
[all …]
/kernel/linux/linux-5.10/fs/ocfs2/
Ddir.h43 int ocfs2_find_entry(const char *name, int namelen,
51 const char *name, int namelen,
71 int namelen);
75 int namelen,
80 int namelen, u64 *blkno);
87 int namelen,
/kernel/linux/linux-5.10/fs/afs/
Dxattr.c273 size_t namelen; in afs_xattr_get_cell() local
275 namelen = cell->name_len; in afs_xattr_get_cell()
277 return namelen; in afs_xattr_get_cell()
278 if (namelen > size) in afs_xattr_get_cell()
280 memcpy(buffer, cell->name, namelen); in afs_xattr_get_cell()
281 return namelen; in afs_xattr_get_cell()
338 size_t namelen; in afs_xattr_get_volume() local
340 namelen = strlen(volname); in afs_xattr_get_volume()
342 return namelen; in afs_xattr_get_volume()
343 if (namelen > size) in afs_xattr_get_volume()
[all …]
/kernel/linux/linux-5.10/fs/jfs/
Dxattr.c98 return ea->namelen; in name_size()
100 return ea->namelen + XATTR_OS2_PREFIX_LEN; in name_size()
105 int len = ea->namelen; in copy_name()
112 memcpy(buffer, ea->name, ea->namelen); in copy_name()
113 buffer[ea->namelen] = 0; in copy_name()
664 int namelen = strlen(name); in __jfs_setxattr() local
684 if ((namelen == ea->namelen) && in __jfs_setxattr()
685 (memcmp(name, ea->name, namelen) == 0)) { in __jfs_setxattr()
710 new_size += sizeof (struct jfs_ea) + namelen + 1 + value_len; in __jfs_setxattr()
756 ea->namelen = namelen; in __jfs_setxattr()
[all …]
/kernel/linux/linux-5.10/fs/qnx4/
Dnamei.c30 int namelen, thislen; in qnx4_match() local
39 namelen = QNX4_NAME_MAX; in qnx4_match()
41 namelen = QNX4_SHORT_NAME_MAX; in qnx4_match()
44 if ( thislen > namelen ) in qnx4_match()
45 thislen = namelen; in qnx4_match()
/kernel/linux/linux-5.10/fs/xfs/scrub/
Dattr.c111 int namelen, in xchk_xattr_listent() argument
132 if (!xfs_attr_namecheck(name, namelen)) { in xchk_xattr_listent()
156 args.namelen = namelen; in xchk_xattr_listent()
157 args.hashval = xfs_da_hashname(args.name, args.namelen); in xchk_xattr_listent()
279 namesize = xfs_attr_leaf_entsize_local(lentry->namelen, in xchk_xattr_entry()
282 if (lentry->namelen == 0) in xchk_xattr_entry()
286 namesize = xfs_attr_leaf_entsize_remote(rentry->namelen); in xchk_xattr_entry()
288 if (rentry->namelen == 0 || rentry->valueblk == 0) in xchk_xattr_entry()
450 if (lentry->namelen <= 0) { in xchk_xattr_rec()
454 calc_hash = xfs_da_hashname(lentry->nameval, lentry->namelen); in xchk_xattr_rec()
[all …]
/kernel/linux/linux-5.10/kernel/locking/
Dlockdep_proc.c462 int i, namelen; in seq_stats() local
468 namelen = 38; in seq_stats()
470 namelen -= 2; /* XXX truncates versions > 9 */ in seq_stats()
472 namelen -= 2; in seq_stats()
487 snprintf(name, namelen, "%s", key_name); in seq_stats()
489 snprintf(name, namelen, "%s", cname); in seq_stats()
493 namelen = strlen(name); in seq_stats()
495 snprintf(name+namelen, 3, "#%d", class->name_version); in seq_stats()
496 namelen += 2; in seq_stats()
499 snprintf(name+namelen, 3, "/%d", class->subclass); in seq_stats()
[all …]

123456789