Home
last modified time | relevance | path

Searched refs:len (Results 1 – 25 of 612) sorted by relevance

12345678910>>...25

/fs/ext4/
Dcrypto_fname.c80 if (iname->len <= 0 || iname->len > lim) in ext4_fname_encrypt()
83 ciphertext_len = (iname->len < EXT4_CRYPTO_BLOCK_SIZE) ? in ext4_fname_encrypt()
84 EXT4_CRYPTO_BLOCK_SIZE : iname->len; in ext4_fname_encrypt()
111 memcpy(workbuf, iname->name, iname->len); in ext4_fname_encrypt()
112 if (iname->len < ciphertext_len) in ext4_fname_encrypt()
113 memset(workbuf + iname->len, 0, ciphertext_len - iname->len); in ext4_fname_encrypt()
134 oname->len = ciphertext_len; in ext4_fname_encrypt()
159 if (iname->len <= 0 || iname->len > lim) in ext4_fname_decrypt()
163 tmp_in[0].len = iname->len; in ext4_fname_decrypt()
181 sg_init_one(&src_sg, iname->name, iname->len); in ext4_fname_decrypt()
[all …]
Dhash.c38 static __u32 dx_hack_hash_unsigned(const char *name, int len) in dx_hack_hash_unsigned() argument
43 while (len--) { in dx_hack_hash_unsigned()
54 static __u32 dx_hack_hash_signed(const char *name, int len) in dx_hack_hash_signed() argument
59 while (len--) { in dx_hack_hash_signed()
70 static void str2hashbuf_signed(const char *msg, int len, __u32 *buf, int num) in str2hashbuf_signed() argument
76 pad = (__u32)len | ((__u32)len << 8); in str2hashbuf_signed()
80 if (len > num*4) in str2hashbuf_signed()
81 len = num * 4; in str2hashbuf_signed()
82 for (i = 0; i < len; i++) { in str2hashbuf_signed()
98 static void str2hashbuf_unsigned(const char *msg, int len, __u32 *buf, int num) in str2hashbuf_unsigned() argument
[all …]
/fs/isofs/
Drock.c29 int len; member
54 rs->len = sizeof(struct iso_directory_record) + de->name_len[0]; in setup_rock_ridge()
55 if (rs->len & 1) in setup_rock_ridge()
56 (rs->len)++; in setup_rock_ridge()
57 rs->chr = (unsigned char *)de + rs->len; in setup_rock_ridge()
58 rs->len = *((unsigned char *)de) - rs->len; in setup_rock_ridge()
59 if (rs->len < 0) in setup_rock_ridge()
60 rs->len = 0; in setup_rock_ridge()
63 rs->len -= ISOFS_SB(inode->i_sb)->s_rock_offset; in setup_rock_ridge()
65 if (rs->len < 0) in setup_rock_ridge()
[all …]
Djoliet.c17 uni16_to_x8(unsigned char *ascii, __be16 *uni, int len, struct nls_table *nls) in uni16_to_x8() argument
25 while ((ch = get_unaligned(ip)) && len) { in uni16_to_x8()
34 len--; in uni16_to_x8()
45 unsigned char len = 0; in get_joliet_filename() local
51 len = utf16s_to_utf8s((const wchar_t *) de->name, in get_joliet_filename()
55 len = uni16_to_x8(outname, (__be16 *) de->name, in get_joliet_filename()
58 if ((len > 2) && (outname[len-2] == ';') && (outname[len-1] == '1')) in get_joliet_filename()
59 len -= 2; in get_joliet_filename()
65 while (len >= 2 && (outname[len-1] == '.')) in get_joliet_filename()
66 len--; in get_joliet_filename()
[all …]
/fs/cachefiles/
Dkey.c42 int loop, len, max, seg, mark, print; in cachefiles_cook_key() local
85 len = 0; in cachefiles_cook_key()
89 len = 5; in cachefiles_cook_key()
90 mark = len - 1; in cachefiles_cook_key()
96 key[len + 1] = cachefiles_charmap[acc & 63]; in cachefiles_cook_key()
98 key[len] = cachefiles_charmap[acc & 63]; in cachefiles_cook_key()
99 len += 2; in cachefiles_cook_key()
104 key[len++] = '\0'; in cachefiles_cook_key()
105 mark = len; in cachefiles_cook_key()
106 key[len++] = '+'; in cachefiles_cook_key()
[all …]
/fs/hpfs/
Dname.c41 int hpfs_chk_name(const unsigned char *name, unsigned *len) in hpfs_chk_name() argument
44 if (*len > 254) return -ENAMETOOLONG; in hpfs_chk_name()
45 hpfs_adjust_length(name, len); in hpfs_chk_name()
46 if (!*len) return -EINVAL; in hpfs_chk_name()
47 for (i = 0; i < *len; i++) if (not_allowed_char(name[i])) return -EINVAL; in hpfs_chk_name()
48 if (*len == 1) if (name[0] == '.') return -EINVAL; in hpfs_chk_name()
49 if (*len == 2) if (name[0] == '.' && name[1] == '.') return -EINVAL; in hpfs_chk_name()
54 unsigned len, int lc, int lng) in hpfs_translate_name() argument
58 if (hpfs_sb(s)->sb_chk >= 2) if (hpfs_is_name_long(from, len) != lng) { in hpfs_translate_name()
60 for (i=0; i<len; i++) printk("%c", from[i]); in hpfs_translate_name()
[all …]
Dea.c14 void hpfs_ea_ext_remove(struct super_block *s, secno a, int ano, unsigned len) in hpfs_ea_ext_remove() argument
17 while (pos < len) { in hpfs_ea_ext_remove()
20 if (pos + 4 > len) { in hpfs_ea_ext_remove()
22 ano ? "anode" : "sectors", a, len); in hpfs_ea_ext_remove()
38 if (!ano) hpfs_free_sectors(s, a, (len+511) >> 9); in hpfs_ea_ext_remove()
77 int ano, len; in hpfs_read_ea() local
93 len = le32_to_cpu(fnode->ea_size_l); in hpfs_read_ea()
96 while (pos < len) { in hpfs_read_ea()
98 if (pos + 4 > len) { in hpfs_read_ea()
100 ano ? "anode" : "sectors", a, len); in hpfs_read_ea()
[all …]
/fs/cifs/
Dcifs_unicode.c79 int len = 1; in cifs_mapchar() local
113 return len; in cifs_mapchar()
116 len = cp->uni2char(src_char, target, NLS_MAX_CHARSET_SIZE); in cifs_mapchar()
117 if (len <= 0) { in cifs_mapchar()
119 len = 1; in cifs_mapchar()
199 cifs_strtoUTF16(__le16 *to, const char *from, int len, in cifs_strtoUTF16() argument
213 i = utf8s_to_utf16s(from, len, UTF16_LITTLE_ENDIAN, in cifs_strtoUTF16()
214 (wchar_t *) to, len); in cifs_strtoUTF16()
227 for (i = 0; len && *from; i++, from += charlen, len -= charlen) { in cifs_strtoUTF16()
228 charlen = codepage->char2uni(from, len, &wchar_to); in cifs_strtoUTF16()
[all …]
Ddns_resolve.c51 int len, rc; in dns_resolve_server_name_to_ip() local
56 len = strlen(unc); in dns_resolve_server_name_to_ip()
57 if (len < 3) { in dns_resolve_server_name_to_ip()
63 len -= 2; in dns_resolve_server_name_to_ip()
67 sep = memchr(hostname, '/', len); in dns_resolve_server_name_to_ip()
69 len = sep - hostname; in dns_resolve_server_name_to_ip()
75 rc = cifs_convert_address((struct sockaddr *)&ss, hostname, len); in dns_resolve_server_name_to_ip()
80 rc = dns_query(NULL, hostname, len, NULL, ip_addr, NULL); in dns_resolve_server_name_to_ip()
83 __func__, len, len, hostname); in dns_resolve_server_name_to_ip()
86 __func__, len, len, hostname, *ip_addr); in dns_resolve_server_name_to_ip()
[all …]
Dsmb2misc.c99 __u32 len = get_rfc1002_length(buf); in smb2_check_message() local
105 __func__, length, len); in smb2_check_message()
125 if (len > CIFSMaxBufSize + MAX_SMB2_HDR_SIZE - 4) { in smb2_check_message()
163 if (4 + len != length) { in smb2_check_message()
165 length, 4 + len, mid); in smb2_check_message()
171 if (4 + len != clc_len) { in smb2_check_message()
173 clc_len, 4 + len, mid); in smb2_check_message()
175 if (clc_len + 20 == len && command == SMB2_OPLOCK_BREAK_HE) in smb2_check_message()
178 if (clc_len == 4 + len + 1) in smb2_check_message()
217 smb2_get_data_area_len(int *off, int *len, struct smb2_hdr *hdr) in smb2_get_data_area_len() argument
[all …]
/fs/ext3/
Dhash.c36 static __u32 dx_hack_hash_unsigned(const char *name, int len) in dx_hack_hash_unsigned() argument
41 while (len--) { in dx_hack_hash_unsigned()
52 static __u32 dx_hack_hash_signed(const char *name, int len) in dx_hack_hash_signed() argument
57 while (len--) { in dx_hack_hash_signed()
68 static void str2hashbuf_signed(const char *msg, int len, __u32 *buf, int num) in str2hashbuf_signed() argument
74 pad = (__u32)len | ((__u32)len << 8); in str2hashbuf_signed()
78 if (len > num*4) in str2hashbuf_signed()
79 len = num * 4; in str2hashbuf_signed()
80 for (i = 0; i < len; i++) { in str2hashbuf_signed()
96 static void str2hashbuf_unsigned(const char *msg, int len, __u32 *buf, int num) in str2hashbuf_unsigned() argument
[all …]
/fs/hfs/
Dstring.c58 unsigned int hash, len = this->len; in hfs_hash_dentry() local
60 if (len > HFS_NAMELEN) in hfs_hash_dentry()
61 len = HFS_NAMELEN; in hfs_hash_dentry()
64 for (; len; len--) in hfs_hash_dentry()
80 int len, tmp; in hfs_strcmp() local
82 len = (len1 > len2) ? len2 : len1; in hfs_strcmp()
84 while (len--) { in hfs_strcmp()
98 unsigned int len, const char *str, const struct qstr *name) in hfs_compare_dentry() argument
102 if (len >= HFS_NAMELEN) { in hfs_compare_dentry()
103 if (name->len < HFS_NAMELEN) in hfs_compare_dentry()
[all …]
/fs/ocfs2/dlm/
Ddlmdebug.c48 int len);
105 stringify_lockname(res->lockname.name, res->lockname.len, in __dlm_print_one_lock_resource()
256 int len) in stringify_lockname() argument
266 out += snprintf(buf + out, len - out, "%.*s%08x", in stringify_lockname()
270 out += snprintf(buf + out, len - out, "%.*s", in stringify_lockname()
276 char *buf, int len) in stringify_nodemap() argument
282 out += snprintf(buf + out, len - out, "%d ", i); in stringify_nodemap()
287 static int dump_mle(struct dlm_master_list_entry *mle, char *buf, int len) in dump_mle() argument
299 out += stringify_lockname(mle->mname, mle->mnamelen, buf + out, len - out); in dump_mle()
300 out += snprintf(buf + out, len - out, in dump_mle()
[all …]
/fs/
Dsplice.c212 buf->len = spd->partial[page_nr].len; in splice_to_pipe()
220 ret += buf->len; in splice_to_pipe()
308 struct pipe_inode_info *pipe, size_t len, in __generic_file_splice_read() argument
333 req_pages = (len + loff + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT; in __generic_file_splice_read()
394 if (!len) in __generic_file_splice_read()
400 this_len = min_t(unsigned long, len, PAGE_CACHE_SIZE - loff); in __generic_file_splice_read()
483 len = this_len; in __generic_file_splice_read()
487 spd.partial[page_nr].len = this_len; in __generic_file_splice_read()
488 len -= this_len; in __generic_file_splice_read()
524 struct pipe_inode_info *pipe, size_t len, in generic_file_splice_read() argument
[all …]
/fs/affs/
Dnamei.c21 unsigned int len, const char *str, const struct qstr *name);
28 unsigned int len, const char *str, const struct qstr *name);
75 i = affs_check_name(qstr->name, qstr->len); in __affs_hash_dentry()
80 i = min(qstr->len, 30u); in __affs_hash_dentry()
101 static inline int __affs_compare_dentry(unsigned int len, in __affs_compare_dentry() argument
112 if (affs_check_name(name->name, name->len)) in __affs_compare_dentry()
119 if (len >= 30) { in __affs_compare_dentry()
120 if (name->len < 30) in __affs_compare_dentry()
122 len = 30; in __affs_compare_dentry()
123 } else if (len != name->len) in __affs_compare_dentry()
[all …]
/fs/reiserfs/
Dhashes.c50 u32 keyed_hash(const signed char *msg, int len) in keyed_hash() argument
61 pad = (u32) len | ((u32) len << 8); in keyed_hash()
64 while (len >= 16) { in keyed_hash()
78 len -= 16; in keyed_hash()
82 if (len >= 12) { in keyed_hash()
92 for (i = 12; i < len; i++) { in keyed_hash()
96 } else if (len >= 8) { in keyed_hash()
103 for (i = 8; i < len; i++) { in keyed_hash()
107 } else if (len >= 4) { in keyed_hash()
112 for (i = 4; i < len; i++) { in keyed_hash()
[all …]
/fs/ubifs/
Dscan.c40 static int scan_padding_bytes(void *buf, int len) in scan_padding_bytes() argument
42 int pad_len = 0, max_pad_len = min_t(int, UBIFS_PAD_NODE_SZ, len); in scan_padding_bytes()
69 int ubifs_scan_a_node(const struct ubifs_info *c, void *buf, int len, int lnum, in ubifs_scan_a_node() argument
83 return scan_padding_bytes(buf, len); in ubifs_scan_a_node()
85 if (len < UBIFS_CH_SZ) in ubifs_scan_a_node()
97 int node_len = le32_to_cpu(ch->len); in ubifs_scan_a_node()
208 snod->len = le32_to_cpu(ch->len); in ubifs_add_snod()
241 int len; in ubifs_scanned_corruption() local
244 len = c->leb_size - offs; in ubifs_scanned_corruption()
245 if (len > 8192) in ubifs_scanned_corruption()
[all …]
Drecovery.c62 static int is_empty(void *buf, int len) in is_empty() argument
67 for (i = 0; i < len; i++) in is_empty()
81 static int first_non_ff(void *buf, int len) in first_non_ff() argument
86 for (i = 0; i < len; i++) in first_non_ff()
113 int err, offs, len; in get_master_node() local
127 len = c->leb_size; in get_master_node()
135 len -= sz; in get_master_node()
143 len += sz; in get_master_node()
144 ret = ubifs_scan_a_node(c, buf, len, lnum, offs, 1); in get_master_node()
149 len += sz; in get_master_node()
[all …]
Dio.c100 int len, int even_ebadmsg) in ubifs_leb_read() argument
104 err = ubi_read(c->ubi, lnum, buf, offs, len); in ubifs_leb_read()
111 len, lnum, offs, err); in ubifs_leb_read()
118 int len) in ubifs_leb_write() argument
126 err = ubi_leb_write(c->ubi, lnum, buf, offs, len); in ubifs_leb_write()
128 err = dbg_leb_write(c, lnum, buf, offs, len); in ubifs_leb_write()
131 len, lnum, offs, err); in ubifs_leb_write()
138 int ubifs_leb_change(struct ubifs_info *c, int lnum, const void *buf, int len) in ubifs_leb_change() argument
146 err = ubi_leb_change(c->ubi, lnum, buf, len); in ubifs_leb_change()
148 err = dbg_leb_change(c, lnum, buf, len); in ubifs_leb_change()
[all …]
Djournal.c115 static int reserve_space(struct ubifs_info *c, int jhead, int len) in reserve_space() argument
136 if (wbuf->lnum != -1 && avail >= len) in reserve_space()
143 lnum = ubifs_find_free_space(c, len, &offs, squeeze); in reserve_space()
186 if (wbuf->lnum != -1 && avail >= len) { in reserve_space()
255 static int write_node(struct ubifs_info *c, int jhead, void *node, int len, in write_node() argument
266 dbg_jhead(jhead), *lnum, *offs, len); in write_node()
267 ubifs_prepare_node(c, node, len, 0); in write_node()
269 return ubifs_wbuf_write_nolock(wbuf, node, len); in write_node()
286 static int write_head(struct ubifs_info *c, int jhead, void *buf, int len, in write_head() argument
297 dbg_jhead(jhead), *lnum, *offs, len); in write_head()
[all …]
/fs/lockd/
Dxdr.c46 unsigned int len; in nlm_decode_cookie() local
48 len = ntohl(*p++); in nlm_decode_cookie()
50 if(len==0) in nlm_decode_cookie()
52 c->len=4; in nlm_decode_cookie()
55 else if(len<=NLM_MAXCOOKIELEN) in nlm_decode_cookie()
57 c->len=len; in nlm_decode_cookie()
58 memcpy(c->data, p, len); in nlm_decode_cookie()
59 p+=XDR_QUADLEN(len); in nlm_decode_cookie()
65 len, NLM_MAXCOOKIELEN); in nlm_decode_cookie()
74 *p++ = htonl(c->len); in nlm_encode_cookie()
[all …]
Dxdr4.c48 unsigned int len; in nlm4_decode_cookie() local
50 len = ntohl(*p++); in nlm4_decode_cookie()
52 if(len==0) in nlm4_decode_cookie()
54 c->len=4; in nlm4_decode_cookie()
57 else if(len<=NLM_MAXCOOKIELEN) in nlm4_decode_cookie()
59 c->len=len; in nlm4_decode_cookie()
60 memcpy(c->data, p, len); in nlm4_decode_cookie()
61 p+=XDR_QUADLEN(len); in nlm4_decode_cookie()
67 len, NLM_MAXCOOKIELEN); in nlm4_decode_cookie()
76 *p++ = htonl(c->len); in nlm4_encode_cookie()
[all …]
/fs/autofs4/
Dwaitq.c106 (unsigned long) wq->wait_queue_token, wq->name.len, wq->name.name, type); in autofs4_notify_daemon()
128 mp->len = wq->name.len; in autofs4_notify_daemon()
129 memcpy(mp->name, wq->name.name, wq->name.len); in autofs4_notify_daemon()
130 mp->name[wq->name.len] = '\0'; in autofs4_notify_daemon()
140 ep->len = wq->name.len; in autofs4_notify_daemon()
141 memcpy(ep->name, wq->name.name, wq->name.len); in autofs4_notify_daemon()
142 ep->name[wq->name.len] = '\0'; in autofs4_notify_daemon()
160 packet->len = wq->name.len; in autofs4_notify_daemon()
161 memcpy(packet->name, wq->name.name, wq->name.len); in autofs4_notify_daemon()
162 packet->name[wq->name.len] = '\0'; in autofs4_notify_daemon()
[all …]
/fs/logfs/
Ddev_mtd.c16 static int logfs_mtd_read(struct super_block *sb, loff_t ofs, size_t len, in logfs_mtd_read() argument
23 ret = mtd_read(mtd, ofs, len, &retlen, buf); in logfs_mtd_read()
29 if (retlen != len) in logfs_mtd_read()
35 static int loffs_mtd_write(struct super_block *sb, loff_t ofs, size_t len, in loffs_mtd_write() argument
47 BUG_ON((ofs >= mtd->size) || (len > mtd->size - ofs)); in loffs_mtd_write()
49 BUG_ON(len > PAGE_CACHE_SIZE); in loffs_mtd_write()
51 page_end = PAGE_CACHE_ALIGN(ofs + len) - 1; in loffs_mtd_write()
52 ret = mtd_write(mtd, ofs, len, &retlen, buf); in loffs_mtd_write()
53 if (ret || (retlen != len)) in loffs_mtd_write()
73 size_t len) in logfs_mtd_erase_mapping() argument
[all …]
/fs/hfsplus/
Dunicode.c69 int len; in hfsplus_strcmp() local
76 for (len = min(len1, len2); len > 0; len--) { in hfsplus_strcmp()
130 int i, len, ustrlen, res, compose; in hfsplus_uni2asc() local
135 len = *len_p; in hfsplus_uni2asc()
192 res = nls->uni2char(c0, op, len); in hfsplus_uni2asc()
200 len -= res; in hfsplus_uni2asc()
235 res = nls->uni2char(cc, op, len); in hfsplus_uni2asc()
243 len -= res; in hfsplus_uni2asc()
255 static inline int asc2unichar(struct super_block *sb, const char *astr, int len, in asc2unichar() argument
258 int size = HFSPLUS_SB(sb)->nls->char2uni(astr, len, uc); in asc2unichar()
[all …]

12345678910>>...25