Home
last modified time | relevance | path

Searched refs:buflen (Results 1 – 25 of 391) sorted by relevance

12345678910>>...16

/Linux-v5.4/fs/
Dd_path.c11 static int prepend(char **buffer, int *buflen, const char *str, int namelen) in prepend() argument
13 *buflen -= namelen; in prepend()
14 if (*buflen < 0) in prepend()
38 static int prepend_name(char **buffer, int *buflen, const struct qstr *name) in prepend_name() argument
44 *buflen -= dlen + 1; in prepend_name()
45 if (*buflen < 0) in prepend_name()
77 char **buffer, int *buflen) in prepend_path() argument
94 blen = *buflen; in prepend_path()
108 blen = *buflen; in prepend_path()
156 *buflen = blen; in prepend_path()
[all …]
/Linux-v5.4/net/sunrpc/
Daddr.c29 char *buf, const int buflen) in rpc_ntop6_noscopeid() argument
40 return snprintf(buf, buflen, "::"); in rpc_ntop6_noscopeid()
48 return snprintf(buf, buflen, "::1"); in rpc_ntop6_noscopeid()
57 return snprintf(buf, buflen, "::ffff:%pI4", in rpc_ntop6_noscopeid()
63 return snprintf(buf, buflen, "%pI6c", addr); in rpc_ntop6_noscopeid()
67 char *buf, const size_t buflen) in rpc_ntop6() argument
74 len = rpc_ntop6_noscopeid(sap, buf, buflen); in rpc_ntop6()
89 if (unlikely(len > buflen)) in rpc_ntop6()
99 char *buf, const int buflen) in rpc_ntop6_noscopeid() argument
105 char *buf, const size_t buflen) in rpc_ntop6() argument
[all …]
/Linux-v5.4/net/mac80211/
Ddebugfs_netdev.c70 int buflen) \
72 return scnprintf(buf, buflen, format_string, sdata->field); \
86 char *buf, int buflen) \
91 p += scnprintf(p, buflen + buf - p, "%.2x ", \
94 p += scnprintf(p, buflen + buf - p, "\n"); \
101 char *buf, int buflen) \
103 return scnprintf(buf, buflen, "%d\n", atomic_read(&sdata->field));\
109 int buflen) \
111 return scnprintf(buf, buflen, "%pM\n", sdata->field); \
117 char *buf, int buflen) \
[all …]
/Linux-v5.4/drivers/usb/storage/
Dprotocol.c122 unsigned int buflen, struct scsi_cmnd *srb, struct scatterlist **sgptr, in usb_stor_access_xfer_buf() argument
141 while (sg_miter_next(&miter) && cnt < buflen) { in usb_stor_access_xfer_buf()
143 buflen - cnt); in usb_stor_access_xfer_buf()
170 unsigned int buflen, struct scsi_cmnd *srb) in usb_stor_set_xfer_buf() argument
175 buflen = min(buflen, scsi_bufflen(srb)); in usb_stor_set_xfer_buf()
176 buflen = usb_stor_access_xfer_buf(buffer, buflen, srb, &sg, &offset, in usb_stor_set_xfer_buf()
178 if (buflen < scsi_bufflen(srb)) in usb_stor_set_xfer_buf()
179 scsi_set_resid(srb, scsi_bufflen(srb) - buflen); in usb_stor_set_xfer_buf()
/Linux-v5.4/drivers/net/wireless/broadcom/brcm80211/brcmfmac/
Dfwil.c194 char *buf, u32 buflen) in brcmf_create_iovar() argument
200 if ((len + datalen) > buflen) in brcmf_create_iovar()
219 u32 buflen; in brcmf_fil_iovar_data_set() local
227 buflen = brcmf_create_iovar(name, data, len, drvr->proto_buf, in brcmf_fil_iovar_data_set()
229 if (buflen) { in brcmf_fil_iovar_data_set()
231 buflen, true); in brcmf_fil_iovar_data_set()
247 u32 buflen; in brcmf_fil_iovar_data_get() local
251 buflen = brcmf_create_iovar(name, data, len, drvr->proto_buf, in brcmf_fil_iovar_data_get()
253 if (buflen) { in brcmf_fil_iovar_data_get()
255 buflen, false); in brcmf_fil_iovar_data_get()
[all …]
/Linux-v5.4/block/partitions/
Dldm.c621 static int ldm_relative(const u8 *buffer, int buflen, int base, int offset) in ldm_relative() argument
625 if (!buffer || offset < 0 || base > buflen) { in ldm_relative()
630 if (base > buflen) in ldm_relative()
631 ldm_error("base (%d) > buflen (%d)", base, buflen); in ldm_relative()
634 if (base + buffer[base] >= buflen) { in ldm_relative()
636 buffer[base], buflen); in ldm_relative()
692 static int ldm_get_vstr (const u8 *block, u8 *buffer, int buflen) in ldm_get_vstr() argument
699 if (length >= buflen) { in ldm_get_vstr()
700 ldm_error ("Truncating string %d -> %d.", length, buflen); in ldm_get_vstr()
701 length = buflen - 1; in ldm_get_vstr()
[all …]
/Linux-v5.4/security/tomoyo/
Drealpath.c94 const int buflen) in tomoyo_get_absolute_path() argument
98 if (buflen >= 256) { in tomoyo_get_absolute_path()
100 pos = d_absolute_path(path, buffer, buflen - 1); in tomoyo_get_absolute_path()
105 buffer[buflen - 2] = '/'; in tomoyo_get_absolute_path()
106 buffer[buflen - 1] = '\0'; in tomoyo_get_absolute_path()
125 const int buflen) in tomoyo_get_dentry_path() argument
129 if (buflen >= 256) { in tomoyo_get_dentry_path()
130 pos = dentry_path_raw(dentry, buffer, buflen - 1); in tomoyo_get_dentry_path()
135 buffer[buflen - 2] = '/'; in tomoyo_get_dentry_path()
136 buffer[buflen - 1] = '\0'; in tomoyo_get_dentry_path()
[all …]
/Linux-v5.4/fs/9p/
Dvfs_dir.c71 static struct p9_rdir *v9fs_alloc_rdir_buf(struct file *filp, int buflen) in v9fs_alloc_rdir_buf() argument
75 fid->rdir = kzalloc(sizeof(struct p9_rdir) + buflen, GFP_KERNEL); in v9fs_alloc_rdir_buf()
92 int buflen; in v9fs_dir_readdir() local
99 buflen = fid->clnt->msize - P9_IOHDRSZ; in v9fs_dir_readdir()
101 rdir = v9fs_alloc_rdir_buf(file, buflen); in v9fs_dir_readdir()
105 kvec.iov_len = buflen; in v9fs_dir_readdir()
111 iov_iter_kvec(&to, READ, &kvec, 1, buflen); in v9fs_dir_readdir()
152 int buflen; in v9fs_dir_readdir_dotl() local
159 buflen = fid->clnt->msize - P9_READDIRHDRSZ; in v9fs_dir_readdir_dotl()
161 rdir = v9fs_alloc_rdir_buf(file, buflen); in v9fs_dir_readdir_dotl()
[all …]
/Linux-v5.4/net/netfilter/
Dnf_nat_ftp.c34 char *buffer, size_t buflen, in nf_nat_ftp_fmt_cmd() argument
40 return snprintf(buffer, buflen, "%u,%u,%u,%u,%u,%u", in nf_nat_ftp_fmt_cmd()
49 return snprintf(buffer, buflen, "|1|%pI4|%u|", in nf_nat_ftp_fmt_cmd()
52 return snprintf(buffer, buflen, "|2|%pI6|%u|", in nf_nat_ftp_fmt_cmd()
55 return snprintf(buffer, buflen, "|||%u|", port); in nf_nat_ftp_fmt_cmd()
76 unsigned int buflen; in nf_nat_ftp() local
108 buflen = nf_nat_ftp_fmt_cmd(ct, type, buffer, sizeof(buffer), in nf_nat_ftp()
110 if (!buflen) in nf_nat_ftp()
116 matchlen, buffer, buflen)) in nf_nat_ftp()
Dnf_nat_sip.c38 const char *buffer, unsigned int buflen) in mangle_packet() argument
52 buffer, buflen, false)) in mangle_packet()
60 buffer, buflen)) in mangle_packet()
66 *datalen += buflen - matchlen; in mangle_packet()
103 unsigned int buflen; in map_addr() local
122 buflen = sip_sprintf_addr_port(ct, buffer, &newaddr, ntohs(newport)); in map_addr()
124 matchoff, matchlen, buffer, buflen); in map_addr()
182 unsigned int olen, matchend, poff, plen, buflen, n; in nf_nat_sip() local
215 buflen = sip_sprintf_addr(ct, buffer, in nf_nat_sip()
219 poff, plen, buffer, buflen)) { in nf_nat_sip()
[all …]
/Linux-v5.4/drivers/net/wireless/intel/iwlwifi/mvm/
Ddebugfs.h68 #define MVM_DEBUGFS_WRITE_WRAPPER(name, buflen, argtype) \ argument
74 char buf[buflen] = {}; \
83 #define _MVM_DEBUGFS_READ_WRITE_FILE_OPS(name, buflen, argtype) \ argument
84 MVM_DEBUGFS_WRITE_WRAPPER(name, buflen, argtype) \
92 #define _MVM_DEBUGFS_WRITE_FILE_OPS(name, buflen, argtype) \ argument
93 MVM_DEBUGFS_WRITE_WRAPPER(name, buflen, argtype) \
/Linux-v5.4/fs/romfs/
Dstorage.c24 void *buf, size_t buflen) in romfs_mtd_read() argument
29 ret = ROMFS_MTD_READ(sb, pos, buflen, &rlen, buf); in romfs_mtd_read()
30 return (ret < 0 || rlen != buflen) ? -EIO : 0; in romfs_mtd_read()
104 void *buf, size_t buflen) in romfs_blk_read() argument
111 while (buflen > 0) { in romfs_blk_read()
113 segment = min_t(size_t, buflen, ROMBSIZE - offset); in romfs_blk_read()
120 buflen -= segment; in romfs_blk_read()
215 void *buf, size_t buflen) in romfs_dev_read() argument
222 if (buflen > limit - pos) in romfs_dev_read()
223 buflen = limit - pos; in romfs_dev_read()
[all …]
/Linux-v5.4/tools/lib/traceevent/
Dtep_strerror.c30 enum tep_errno errnum, char *buf, size_t buflen) in tep_strerror() argument
35 if (!buflen) in tep_strerror()
39 int err = strerror_r(errnum, buf, buflen); in tep_strerror()
40 buf[buflen - 1] = 0; in tep_strerror()
50 snprintf(buf, buflen, "%s", msg); in tep_strerror()
/Linux-v5.4/security/apparmor/
Dpath.c25 static int prepend(char **buffer, int buflen, const char *str, int namelen) in prepend() argument
27 buflen -= namelen; in prepend()
28 if (buflen < 0) in prepend()
95 int buflen = aa_g_path_max - isdir; in d_namespace_path() local
99 res = dentry_path(path->dentry, buf, buflen); in d_namespace_path()
122 res = __d_path(path, &root, buf, buflen); in d_namespace_path()
125 res = d_absolute_path(path, buf, buflen); in d_namespace_path()
140 res = dentry_path_raw(path->dentry, buf, buflen); in d_namespace_path()
/Linux-v5.4/fs/afs/
Dcache.c13 uint16_t buflen,
42 uint16_t buflen, in afs_vnode_cache_check_aux() argument
50 buffer, buflen); in afs_vnode_cache_check_aux()
55 if (buflen != sizeof(aux)) { in afs_vnode_cache_check_aux()
56 _leave(" = OBSOLETE [len %hx != %zx]", buflen, sizeof(aux)); in afs_vnode_cache_check_aux()
/Linux-v5.4/tools/lib/
Dstr_error_r.c21 char *str_error_r(int errnum, char *buf, size_t buflen) in str_error_r() argument
23 int err = strerror_r(errnum, buf, buflen); in str_error_r()
25 snprintf(buf, buflen, "INTERNAL ERROR: strerror_r(%d, [buf], %zd)=%d", errnum, buflen, err); in str_error_r()
/Linux-v5.4/crypto/
Dnhpoly1305.c148 state->buflen = 0; in crypto_nhpoly1305_init()
162 if (state->buflen) { in crypto_nhpoly1305_update_helper()
163 bytes = min(srclen, (int)NH_MESSAGE_UNIT - state->buflen); in crypto_nhpoly1305_update_helper()
164 memcpy(&state->buffer[state->buflen], src, bytes); in crypto_nhpoly1305_update_helper()
165 state->buflen += bytes; in crypto_nhpoly1305_update_helper()
166 if (state->buflen < NH_MESSAGE_UNIT) in crypto_nhpoly1305_update_helper()
170 state->buflen = 0; in crypto_nhpoly1305_update_helper()
184 state->buflen = srclen; in crypto_nhpoly1305_update_helper()
202 if (state->buflen) { in crypto_nhpoly1305_final_helper()
203 memset(&state->buffer[state->buflen], 0, in crypto_nhpoly1305_final_helper()
[all …]
/Linux-v5.4/drivers/scsi/esas2r/
Desas2r_log.c125 size_t buflen = EVENT_LOG_BUFF_SIZE; in esas2r_log_master() local
133 memset(buffer, 0, buflen); in esas2r_log_master()
142 snprintf(buffer, buflen, fmt_nodev, slevel, in esas2r_log_master()
145 snprintf(buffer, buflen, fmt_dev, slevel, in esas2r_log_master()
153 buflen -= strlen(event_buffer); in esas2r_log_master()
155 retval = vsnprintf(buffer, buflen, format, args); in esas2r_log_master()
/Linux-v5.4/drivers/net/wireless/intel/iwlwifi/fw/
Ddebugfs.c68 #define FWRT_DEBUGFS_OPEN_WRAPPER(name, buflen, argtype) \ argument
73 char rbuf[buflen]; \
118 #define _FWRT_DEBUGFS_READ_FILE_OPS(name, buflen, argtype) \ argument
119 FWRT_DEBUGFS_OPEN_WRAPPER(name, buflen, argtype) \
128 #define FWRT_DEBUGFS_WRITE_WRAPPER(name, buflen, argtype) \ argument
135 char buf[buflen] = {}; \
144 #define _FWRT_DEBUGFS_READ_WRITE_FILE_OPS(name, buflen, argtype) \ argument
145 FWRT_DEBUGFS_OPEN_WRAPPER(name, buflen, argtype) \
146 FWRT_DEBUGFS_WRITE_WRAPPER(name, buflen, argtype) \
156 #define _FWRT_DEBUGFS_WRITE_FILE_OPS(name, buflen, argtype) \ argument
[all …]
/Linux-v5.4/arch/powerpc/boot/
Ddevtree.c203 int naddr, int nsize, int buflen) in find_range() argument
208 for (i = 0; i + nrange <= buflen; i += nrange) { in find_range()
236 int buflen, offset; in dt_xlate() local
272 buflen = getprop(node, "ranges", prop_buf, in dt_xlate()
274 if (buflen == 0) in dt_xlate()
276 if (buflen < 0 || buflen > sizeof(prop_buf)) in dt_xlate()
280 naddr, prev_nsize, buflen / 4); in dt_xlate()
321 int dt_xlate_addr(void *node, u32 *buf, int buflen, unsigned long *xlated_addr) in dt_xlate_addr() argument
324 if (buflen > sizeof(prop_buf)) in dt_xlate_addr()
327 memcpy(prop_buf, buf, buflen); in dt_xlate_addr()
[all …]
/Linux-v5.4/security/keys/
Ddh.c200 char __user *buffer, size_t buflen, in keyctl_dh_compute_kdf() argument
205 size_t outbuf_len = roundup(buflen, in keyctl_dh_compute_kdf()
218 ret = buflen; in keyctl_dh_compute_kdf()
219 if (copy_to_user(buffer, outbuf, buflen) != 0) in keyctl_dh_compute_kdf()
228 char __user *buffer, size_t buflen, in __keyctl_dh_compute() argument
245 if (!params || (!buffer && buflen)) { in __keyctl_dh_compute()
262 if (buflen > KEYCTL_KDF_MAX_OUTPUT_LEN || in __keyctl_dh_compute()
332 if (buflen == 0) { in __keyctl_dh_compute()
335 } else if (outlen > buflen) { in __keyctl_dh_compute()
386 ret = keyctl_dh_compute_kdf(sdesc, buffer, buflen, outbuf, in __keyctl_dh_compute()
[all …]
/Linux-v5.4/fs/proc/
Dkcore.c314 read_kcore(struct file *file, char __user *buffer, size_t buflen, loff_t *fpos) in read_kcore() argument
323 size_t orig_buflen = buflen; in read_kcore()
333 if (buflen && *fpos < sizeof(struct elfhdr)) { in read_kcore()
355 tsz = min_t(size_t, buflen, sizeof(struct elfhdr) - *fpos); in read_kcore()
362 buflen -= tsz; in read_kcore()
367 if (buflen && *fpos < phdrs_offset + phdrs_len) { in read_kcore()
400 tsz = min_t(size_t, buflen, phdrs_offset + phdrs_len - *fpos); in read_kcore()
410 buflen -= tsz; in read_kcore()
415 if (buflen && *fpos < notes_offset + notes_len) { in read_kcore()
450 tsz = min_t(size_t, buflen, notes_offset + notes_len - *fpos); in read_kcore()
[all …]
/Linux-v5.4/fs/nfs/
Dnamespace.c51 char *nfs_path(char **p, struct dentry *dentry, char *buffer, ssize_t buflen, in nfs_path() argument
60 end = buffer+buflen; in nfs_path()
62 buflen--; in nfs_path()
71 buflen -= namelen + 1; in nfs_path()
72 if (buflen < 0) in nfs_path()
86 if (--buflen < 0) { in nfs_path()
107 buflen -= namelen; in nfs_path()
108 if (buflen < 0) { in nfs_path()
/Linux-v5.4/drivers/media/usb/uvc/
Duvc_driver.c443 u32 **intervals, unsigned char *buffer, int buflen) in uvc_parse_format() argument
462 if (buflen < n) { in uvc_parse_format()
510 if (buflen < 11) { in uvc_parse_format()
526 if (buflen < 9) { in uvc_parse_format()
583 buflen -= buffer[0]; in uvc_parse_format()
589 while (buflen > 2 && buffer[1] == USB_DT_CS_INTERFACE && in uvc_parse_format()
593 n = buflen > 25 ? buffer[25] : 0; in uvc_parse_format()
595 n = buflen > 21 ? buffer[21] : 0; in uvc_parse_format()
599 if (buflen < 26 + 4*n) { in uvc_parse_format()
670 buflen -= buffer[0]; in uvc_parse_format()
[all …]
/Linux-v5.4/tools/perf/util/
Dtarget.c117 char *buf, size_t buflen) in target__strerror() argument
122 BUG_ON(buflen == 0); in target__strerror()
125 str_error_r(errnum, buf, buflen); in target__strerror()
138 snprintf(buf, buflen, "%s", msg); in target__strerror()
143 snprintf(buf, buflen, msg, target->uid_str); in target__strerror()

12345678910>>...16