/Linux-v4.19/fs/ |
D | d_path.c | 11 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() 154 *buflen = blen; in prepend_path() [all …]
|
/Linux-v4.19/net/sunrpc/ |
D | addr.c | 28 char *buf, const int buflen) in rpc_ntop6_noscopeid() argument 39 return snprintf(buf, buflen, "::"); in rpc_ntop6_noscopeid() 47 return snprintf(buf, buflen, "::1"); in rpc_ntop6_noscopeid() 56 return snprintf(buf, buflen, "::ffff:%pI4", in rpc_ntop6_noscopeid() 62 return snprintf(buf, buflen, "%pI6c", addr); in rpc_ntop6_noscopeid() 66 char *buf, const size_t buflen) in rpc_ntop6() argument 73 len = rpc_ntop6_noscopeid(sap, buf, buflen); in rpc_ntop6() 88 if (unlikely(len > buflen)) in rpc_ntop6() 98 char *buf, const int buflen) in rpc_ntop6_noscopeid() argument 104 char *buf, const size_t buflen) in rpc_ntop6() argument [all …]
|
/Linux-v4.19/net/mac80211/ |
D | debugfs_netdev.c | 73 int buflen) \ 75 return scnprintf(buf, buflen, format_string, sdata->field); \ 89 char *buf, int buflen) \ 94 p += scnprintf(p, buflen + buf - p, "%.2x ", \ 97 p += scnprintf(p, buflen + buf - p, "\n"); \ 104 char *buf, int buflen) \ 106 return scnprintf(buf, buflen, "%d\n", atomic_read(&sdata->field));\ 112 int buflen) \ 114 return scnprintf(buf, buflen, "%pM\n", sdata->field); \ 120 char *buf, int buflen) \ [all …]
|
/Linux-v4.19/drivers/usb/storage/ |
D | protocol.c | 122 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-v4.19/drivers/net/wireless/broadcom/brcm80211/brcmfmac/ |
D | fwil.c | 205 char *buf, u32 buflen) in brcmf_create_iovar() argument 211 if ((len + datalen) > buflen) in brcmf_create_iovar() 230 u32 buflen; in brcmf_fil_iovar_data_set() local 238 buflen = brcmf_create_iovar(name, data, len, drvr->proto_buf, in brcmf_fil_iovar_data_set() 240 if (buflen) { in brcmf_fil_iovar_data_set() 242 buflen, true); in brcmf_fil_iovar_data_set() 258 u32 buflen; in brcmf_fil_iovar_data_get() local 262 buflen = brcmf_create_iovar(name, data, len, drvr->proto_buf, in brcmf_fil_iovar_data_get() 264 if (buflen) { in brcmf_fil_iovar_data_get() 266 buflen, false); in brcmf_fil_iovar_data_get() [all …]
|
/Linux-v4.19/security/tomoyo/ |
D | realpath.c | 94 const int buflen) in tomoyo_get_absolute_path() argument 97 if (buflen >= 256) { in tomoyo_get_absolute_path() 99 pos = d_absolute_path(path, buffer, buflen - 1); in tomoyo_get_absolute_path() 103 buffer[buflen - 2] = '/'; in tomoyo_get_absolute_path() 104 buffer[buflen - 1] = '\0'; in tomoyo_get_absolute_path() 123 const int buflen) in tomoyo_get_dentry_path() argument 126 if (buflen >= 256) { in tomoyo_get_dentry_path() 127 pos = dentry_path_raw(dentry, buffer, buflen - 1); in tomoyo_get_dentry_path() 131 buffer[buflen - 2] = '/'; in tomoyo_get_dentry_path() 132 buffer[buflen - 1] = '\0'; in tomoyo_get_dentry_path() [all …]
|
/Linux-v4.19/block/partitions/ |
D | ldm.c | 635 static int ldm_relative(const u8 *buffer, int buflen, int base, int offset) in ldm_relative() argument 639 if (!buffer || offset < 0 || base > buflen) { in ldm_relative() 644 if (base > buflen) in ldm_relative() 645 ldm_error("base (%d) > buflen (%d)", base, buflen); in ldm_relative() 648 if (base + buffer[base] >= buflen) { in ldm_relative() 650 buffer[base], buflen); in ldm_relative() 706 static int ldm_get_vstr (const u8 *block, u8 *buffer, int buflen) in ldm_get_vstr() argument 713 if (length >= buflen) { in ldm_get_vstr() 714 ldm_error ("Truncating string %d -> %d.", length, buflen); in ldm_get_vstr() 715 length = buflen - 1; in ldm_get_vstr() [all …]
|
/Linux-v4.19/net/netfilter/ |
D | nf_nat_ftp.c | 32 char *buffer, size_t buflen, in nf_nat_ftp_fmt_cmd() argument 38 return snprintf(buffer, buflen, "%u,%u,%u,%u,%u,%u", in nf_nat_ftp_fmt_cmd() 47 return snprintf(buffer, buflen, "|1|%pI4|%u|", in nf_nat_ftp_fmt_cmd() 50 return snprintf(buffer, buflen, "|2|%pI6|%u|", in nf_nat_ftp_fmt_cmd() 53 return snprintf(buffer, buflen, "|||%u|", port); in nf_nat_ftp_fmt_cmd() 74 unsigned int buflen; in nf_nat_ftp() local 106 buflen = nf_nat_ftp_fmt_cmd(ct, type, buffer, sizeof(buffer), in nf_nat_ftp() 108 if (!buflen) in nf_nat_ftp() 114 matchlen, buffer, buflen)) in nf_nat_ftp()
|
D | nf_nat_sip.c | 36 const char *buffer, unsigned int buflen) in mangle_packet() argument 50 buffer, buflen, false)) in mangle_packet() 58 buffer, buflen)) in mangle_packet() 64 *datalen += buflen - matchlen; in mangle_packet() 101 unsigned int buflen; in map_addr() local 120 buflen = sip_sprintf_addr_port(ct, buffer, &newaddr, ntohs(newport)); in map_addr() 122 matchoff, matchlen, buffer, buflen); in map_addr() 180 unsigned int olen, matchend, poff, plen, buflen, n; in nf_nat_sip() local 213 buflen = sip_sprintf_addr(ct, buffer, in nf_nat_sip() 217 poff, plen, buffer, buflen)) { in nf_nat_sip() [all …]
|
/Linux-v4.19/fs/9p/ |
D | vfs_dir.c | 95 static struct p9_rdir *v9fs_alloc_rdir_buf(struct file *filp, int buflen) in v9fs_alloc_rdir_buf() argument 99 fid->rdir = kzalloc(sizeof(struct p9_rdir) + buflen, GFP_KERNEL); in v9fs_alloc_rdir_buf() 116 int buflen; in v9fs_dir_readdir() local 124 buflen = fid->clnt->msize - P9_IOHDRSZ; in v9fs_dir_readdir() 126 rdir = v9fs_alloc_rdir_buf(file, buflen); in v9fs_dir_readdir() 130 kvec.iov_len = buflen; in v9fs_dir_readdir() 136 iov_iter_kvec(&to, READ | ITER_KVEC, &kvec, 1, buflen); in v9fs_dir_readdir() 180 int buflen; in v9fs_dir_readdir_dotl() local 187 buflen = fid->clnt->msize - P9_READDIRHDRSZ; in v9fs_dir_readdir_dotl() 189 rdir = v9fs_alloc_rdir_buf(file, buflen); in v9fs_dir_readdir_dotl() [all …]
|
/Linux-v4.19/drivers/net/wireless/intel/iwlwifi/mvm/ |
D | debugfs.h | 73 #define MVM_DEBUGFS_WRITE_WRAPPER(name, buflen, argtype) \ argument 79 char buf[buflen] = {}; \ 88 #define _MVM_DEBUGFS_READ_WRITE_FILE_OPS(name, buflen, argtype) \ argument 89 MVM_DEBUGFS_WRITE_WRAPPER(name, buflen, argtype) \ 97 #define _MVM_DEBUGFS_WRITE_FILE_OPS(name, buflen, argtype) \ argument 98 MVM_DEBUGFS_WRITE_WRAPPER(name, buflen, argtype) \
|
/Linux-v4.19/fs/romfs/ |
D | storage.c | 28 void *buf, size_t buflen) in romfs_mtd_read() argument 33 ret = ROMFS_MTD_READ(sb, pos, buflen, &rlen, buf); in romfs_mtd_read() 34 return (ret < 0 || rlen != buflen) ? -EIO : 0; in romfs_mtd_read() 108 void *buf, size_t buflen) in romfs_blk_read() argument 115 while (buflen > 0) { in romfs_blk_read() 117 segment = min_t(size_t, buflen, ROMBSIZE - offset); in romfs_blk_read() 124 buflen -= segment; in romfs_blk_read() 219 void *buf, size_t buflen) in romfs_dev_read() argument 226 if (buflen > limit - pos) in romfs_dev_read() 227 buflen = limit - pos; in romfs_dev_read() [all …]
|
/Linux-v4.19/security/apparmor/ |
D | path.c | 29 static int prepend(char **buffer, int buflen, const char *str, int namelen) in prepend() argument 31 buflen -= namelen; in prepend() 32 if (buflen < 0) in prepend() 99 int buflen = aa_g_path_max - isdir; in d_namespace_path() local 103 res = dentry_path(path->dentry, buf, buflen); in d_namespace_path() 126 res = __d_path(path, &root, buf, buflen); in d_namespace_path() 129 res = d_absolute_path(path, buf, buflen); in d_namespace_path() 144 res = dentry_path_raw(path->dentry, buf, buflen); in d_namespace_path()
|
/Linux-v4.19/fs/afs/ |
D | cache.c | 17 uint16_t buflen, 46 uint16_t buflen, in afs_vnode_cache_check_aux() argument 54 buffer, buflen); in afs_vnode_cache_check_aux() 59 if (buflen != sizeof(aux)) { in afs_vnode_cache_check_aux() 60 _leave(" = OBSOLETE [len %hx != %zx]", buflen, sizeof(aux)); in afs_vnode_cache_check_aux()
|
/Linux-v4.19/tools/lib/ |
D | str_error_r.c | 21 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-v4.19/drivers/scsi/esas2r/ |
D | esas2r_log.c | 125 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-v4.19/arch/powerpc/boot/ |
D | devtree.c | 207 int naddr, int nsize, int buflen) in find_range() argument 212 for (i = 0; i + nrange <= buflen; i += nrange) { in find_range() 240 int buflen, offset; in dt_xlate() local 276 buflen = getprop(node, "ranges", prop_buf, in dt_xlate() 278 if (buflen == 0) in dt_xlate() 280 if (buflen < 0 || buflen > sizeof(prop_buf)) in dt_xlate() 284 naddr, prev_nsize, buflen / 4); in dt_xlate() 325 int dt_xlate_addr(void *node, u32 *buf, int buflen, unsigned long *xlated_addr) in dt_xlate_addr() argument 328 if (buflen > sizeof(prop_buf)) in dt_xlate_addr() 331 memcpy(prop_buf, buf, buflen); in dt_xlate_addr() [all …]
|
/Linux-v4.19/security/keys/ |
D | dh.c | 205 char __user *buffer, size_t buflen, in keyctl_dh_compute_kdf() argument 210 size_t outbuf_len = roundup(buflen, in keyctl_dh_compute_kdf() 223 ret = buflen; in keyctl_dh_compute_kdf() 224 if (copy_to_user(buffer, outbuf, buflen) != 0) in keyctl_dh_compute_kdf() 233 char __user *buffer, size_t buflen, in __keyctl_dh_compute() argument 250 if (!params || (!buffer && buflen)) { in __keyctl_dh_compute() 267 if (buflen > KEYCTL_KDF_MAX_OUTPUT_LEN || in __keyctl_dh_compute() 337 if (buflen == 0) { in __keyctl_dh_compute() 340 } else if (outlen > buflen) { in __keyctl_dh_compute() 391 ret = keyctl_dh_compute_kdf(sdesc, buffer, buflen, outbuf, in __keyctl_dh_compute() [all …]
|
/Linux-v4.19/fs/proc/ |
D | kcore.c | 291 read_kcore(struct file *file, char __user *buffer, size_t buflen, loff_t *fpos) in read_kcore() argument 300 size_t orig_buflen = buflen; in read_kcore() 310 if (buflen && *fpos < sizeof(struct elfhdr)) { in read_kcore() 332 tsz = min_t(size_t, buflen, sizeof(struct elfhdr) - *fpos); in read_kcore() 339 buflen -= tsz; in read_kcore() 344 if (buflen && *fpos < phdrs_offset + phdrs_len) { in read_kcore() 377 tsz = min_t(size_t, buflen, phdrs_offset + phdrs_len - *fpos); in read_kcore() 387 buflen -= tsz; in read_kcore() 392 if (buflen && *fpos < notes_offset + notes_len) { in read_kcore() 427 tsz = min_t(size_t, buflen, notes_offset + notes_len - *fpos); in read_kcore() [all …]
|
/Linux-v4.19/crypto/ |
D | poly1305_generic.c | 42 dctx->buflen = 0; in crypto_poly1305_init() 175 if (unlikely(dctx->buflen)) { in crypto_poly1305_update() 176 bytes = min(srclen, POLY1305_BLOCK_SIZE - dctx->buflen); in crypto_poly1305_update() 177 memcpy(dctx->buf + dctx->buflen, src, bytes); in crypto_poly1305_update() 180 dctx->buflen += bytes; in crypto_poly1305_update() 182 if (dctx->buflen == POLY1305_BLOCK_SIZE) { in crypto_poly1305_update() 185 dctx->buflen = 0; in crypto_poly1305_update() 196 dctx->buflen = srclen; in crypto_poly1305_update() 215 if (unlikely(dctx->buflen)) { in crypto_poly1305_final() 216 dctx->buf[dctx->buflen++] = 1; in crypto_poly1305_final() [all …]
|
/Linux-v4.19/fs/nfs/ |
D | namespace.c | 50 char *nfs_path(char **p, struct dentry *dentry, char *buffer, ssize_t buflen, in nfs_path() argument 59 end = buffer+buflen; in nfs_path() 61 buflen--; in nfs_path() 70 buflen -= namelen + 1; in nfs_path() 71 if (buflen < 0) in nfs_path() 85 if (--buflen < 0) { in nfs_path() 106 buflen -= namelen; in nfs_path() 107 if (buflen < 0) { in nfs_path()
|
/Linux-v4.19/drivers/media/usb/uvc/ |
D | uvc_driver.c | 399 u32 **intervals, unsigned char *buffer, int buflen) in uvc_parse_format() argument 418 if (buflen < n) { in uvc_parse_format() 466 if (buflen < 11) { in uvc_parse_format() 482 if (buflen < 9) { in uvc_parse_format() 539 buflen -= buffer[0]; in uvc_parse_format() 545 while (buflen > 2 && buffer[1] == USB_DT_CS_INTERFACE && in uvc_parse_format() 549 n = buflen > 25 ? buffer[25] : 0; in uvc_parse_format() 551 n = buflen > 21 ? buffer[21] : 0; in uvc_parse_format() 555 if (buflen < 26 + 4*n) { in uvc_parse_format() 626 buflen -= buffer[0]; in uvc_parse_format() [all …]
|
/Linux-v4.19/lib/ |
D | scatterlist.c | 140 void sg_init_one(struct scatterlist *sg, const void *buf, unsigned int buflen) in sg_init_one() argument 143 sg_set_buf(sg, buf, buflen); in sg_init_one() 806 size_t buflen, off_t skip, bool to_buffer) in sg_copy_buffer() argument 822 while ((offset < buflen) && sg_miter_next(&miter)) { in sg_copy_buffer() 825 len = min(miter.length, buflen - offset); in sg_copy_buffer() 852 const void *buf, size_t buflen) in sg_copy_from_buffer() argument 854 return sg_copy_buffer(sgl, nents, (void *)buf, buflen, 0, false); in sg_copy_from_buffer() 869 void *buf, size_t buflen) in sg_copy_to_buffer() argument 871 return sg_copy_buffer(sgl, nents, buf, buflen, 0, true); in sg_copy_to_buffer() 887 const void *buf, size_t buflen, off_t skip) in sg_pcopy_from_buffer() argument [all …]
|
/Linux-v4.19/tools/perf/util/ |
D | target.c | 117 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()
|
/Linux-v4.19/drivers/media/usb/b2c2/ |
D | flexcop-usb.c | 109 u8 *pbBuffer, u32 buflen) in flexcop_usb_v8_memory_req() argument 116 if (buflen > sizeof(fc_usb->data)) { in flexcop_usb_v8_memory_req() 143 wAddress, wIndex, buflen); in flexcop_usb_v8_memory_req() 148 memcpy(fc_usb->data, pbBuffer, buflen); in flexcop_usb_v8_memory_req() 156 buflen, in flexcop_usb_v8_memory_req() 158 if (ret != buflen) in flexcop_usb_v8_memory_req() 164 memcpy(pbBuffer, fc_usb->data, buflen); in flexcop_usb_v8_memory_req() 173 #define bytes_left_to_read_on_page(paddr,buflen) \ argument 174 ((V8_MEMORY_PAGE_SIZE - (paddr & V8_MEMORY_PAGE_MASK)) > buflen \ 175 ? buflen : (V8_MEMORY_PAGE_SIZE - (paddr & V8_MEMORY_PAGE_MASK))) [all …]
|