/freebsd/contrib/ofed/libibmad/ |
H A D | dump.c | 211 if (n >= bufsz) in dump_linkwidth() 287 if (n >= bufsz) in dump_linkspeed() 291 if (n >= bufsz) in dump_linkspeed() 358 if (n >= bufsz) { in dump_linkspeedext() 359 if (bufsz > 3) in dump_linkspeedext() 660 valsz = bufsz; in mad_dump_string() 720 if (n >= bufsz) in mad_dump_sltovl() 735 if (n >= bufsz) in mad_dump_vlarbitration() 740 if (n >= bufsz) in mad_dump_vlarbitration() 745 if (n >= bufsz) in mad_dump_vlarbitration() [all …]
|
/freebsd/crypto/openssl/apps/lib/ |
H A D | app_params.c | 13 static int describe_param_type(char *buf, size_t bufsz, const OSSL_PARAM *param) in describe_param_type() argument 45 printed_len = BIO_snprintf(buf, bufsz, "%s: ", param->key); in describe_param_type() 48 bufsz -= printed_len; in describe_param_type() 50 printed_len = BIO_snprintf(buf, bufsz, "%s%s", type_mod, type); in describe_param_type() 53 bufsz -= printed_len; in describe_param_type() 56 printed_len = BIO_snprintf(buf, bufsz, " [%d]", param->data_type); in describe_param_type() 59 bufsz -= printed_len; in describe_param_type() 63 printed_len = BIO_snprintf(buf, bufsz, " (arbitrary size)"); in describe_param_type() 65 printed_len = BIO_snprintf(buf, bufsz, " (max %zu bytes large)", in describe_param_type() 69 bufsz -= printed_len; in describe_param_type()
|
/freebsd/contrib/mandoc/ |
H A D | compat_getline.c | 25 getline(char **buf, size_t *bufsz, FILE *fp) in getline() argument 31 if (buf == NULL || bufsz == NULL) { in getline() 37 *bufsz = 0; in getline() 43 if (pos + 1 >= *bufsz) { in getline() 44 nbufsz = *bufsz ? *bufsz * 2 : BUFSIZ; in getline() 48 *bufsz = nbufsz; in getline()
|
/freebsd/sys/contrib/dev/iwlwifi/mvm/ |
H A D | debugfs-vif.c | 144 int bufsz = sizeof(buf); in iwl_dbgfs_tx_pwr_lmt_read() local 147 pos = scnprintf(buf, bufsz, "bss limit = %d\n", in iwl_dbgfs_tx_pwr_lmt_read() 161 int bufsz = sizeof(buf); in iwl_dbgfs_pm_params_read() local 179 int bufsz = sizeof(buf); in iwl_dbgfs_mac_params_read() local 214 pos += scnprintf(buf+pos, bufsz-pos, "Load: %d\n", in iwl_dbgfs_mac_params_read() 216 pos += scnprintf(buf+pos, bufsz-pos, "QoS:\n"); in iwl_dbgfs_mac_params_read() 218 pos += scnprintf(buf+pos, bufsz-pos, in iwl_dbgfs_mac_params_read() 232 pos += scnprintf(buf+pos, bufsz-pos, in iwl_dbgfs_mac_params_read() 242 pos += scnprintf(buf+pos, bufsz-pos, in iwl_dbgfs_mac_params_read() 403 const size_t bufsz = sizeof(buf); in iwl_dbgfs_bf_params_read() local [all …]
|
H A D | debugfs.c | 310 int bufsz = sizeof(buf); in iwl_dbgfs_sar_geo_profile_read() local 324 pos = scnprintf(buf, bufsz, in iwl_dbgfs_sar_geo_profile_read() 430 if (desc < bufsz - 1) in iwl_dbgfs_rs_data_read() 495 int bufsz = sizeof(buf); in iwl_dbgfs_disable_power_off_read() local 535 int pos, int bufsz) in iwl_mvm_coex_dump_mbox() argument 643 int bufsz = sizeof(buf); in iwl_dbgfs_bt_cmd_read() local 727 endpos = pos + bufsz; in iwl_dbgfs_fw_ver_read() 800 endpos = pos + bufsz; in iwl_dbgfs_tas_get_status_read() 938 size_t bufsz; in iwl_dbgfs_phy_integration_ver_read() local 971 size_t bufsz; in iwl_dbgfs_fw_rx_stats_read() local [all …]
|
H A D | power.c | 702 int bufsz) in iwl_mvm_power_mac_dbgfs_read() argument 712 pos += scnprintf(buf+pos, bufsz-pos, "power_scheme = %d\n", in iwl_mvm_power_mac_dbgfs_read() 714 pos += scnprintf(buf+pos, bufsz-pos, "flags = 0x%x\n", in iwl_mvm_power_mac_dbgfs_read() 716 pos += scnprintf(buf+pos, bufsz-pos, "keep_alive = %d\n", in iwl_mvm_power_mac_dbgfs_read() 722 pos += scnprintf(buf+pos, bufsz-pos, "skip_over_dtim = %d\n", in iwl_mvm_power_mac_dbgfs_read() 728 pos += scnprintf(buf+pos, bufsz-pos, "rx_data_timeout = %d\n", in iwl_mvm_power_mac_dbgfs_read() 730 pos += scnprintf(buf+pos, bufsz-pos, "tx_data_timeout = %d\n", in iwl_mvm_power_mac_dbgfs_read() 734 pos += scnprintf(buf+pos, bufsz-pos, in iwl_mvm_power_mac_dbgfs_read() 748 pos += scnprintf(buf+pos, bufsz-pos, "uapsd_max_sp = %d\n", in iwl_mvm_power_mac_dbgfs_read() 766 pos += scnprintf(buf+pos, bufsz-pos, "snooze_interval = %d\n", in iwl_mvm_power_mac_dbgfs_read() [all …]
|
/freebsd/contrib/elftoolchain/libelf/ |
H A D | libelf_open.c | 53 size_t bufsz, datasz; in _libelf_read_special_file() local 58 bufsz = _LIBELF_INITSIZE; in _libelf_read_special_file() 59 if ((buf = malloc(bufsz)) == NULL) in _libelf_read_special_file() 68 if (datasz == bufsz) { in _libelf_read_special_file() 69 bufsz *= 2; in _libelf_read_special_file() 70 if ((t = realloc(buf, bufsz)) == NULL) in _libelf_read_special_file() 76 assert(bufsz - datasz > 0); in _libelf_read_special_file() 78 if ((readsz = read(fd, t, bufsz - datasz)) <= 0) in _libelf_read_special_file() 81 } while (datasz < bufsz); in _libelf_read_special_file() 95 if (bufsz > datasz) { in _libelf_read_special_file()
|
/freebsd/tests/sys/geom/class/eli/ |
H A D | unaligned_io.c | 53 size_t bufsz, iosz; in main() local 76 bufsz = iosz + secsz; in main() 77 buf1 = mmap(NULL, bufsz, PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE, in main() 81 buf2 = mmap(NULL, bufsz, PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE, in main() 86 arc4random_buf(buf1, bufsz); in main() 87 n = pwrite(fd, buf1, bufsz, 0); in main() 88 if (n < 0 || (size_t)n != bufsz) in main() 118 arc4random_buf(buf1, bufsz); in main()
|
/freebsd/bin/pkill/tests/ |
H A D | spin_helper.c | 60 size_t bufsz = ARG_MAX - in exec_largeargs() local 74 s = malloc(bufsz + 1); in exec_largeargs() 76 s = realloc(s, bufsz + 1); in exec_largeargs() 79 memset(s, 'x', bufsz); in exec_largeargs() 80 s[bufsz] = '\0'; in exec_largeargs() 84 bufsz--; in exec_largeargs()
|
/freebsd/tools/bus_space/ |
H A D | bus.c | 130 bs_read(int rid, off_t ofs, void *buf, ssize_t bufsz) in bs_read() argument 140 if (ofs < 0 || ofs > r->size - bufsz) { in bs_read() 147 switch (bufsz) { in bs_read() 165 s = read(r->fd, buf, bufsz); in bs_read() 166 if (s != bufsz) in bs_read() 228 bs_write(int rid, off_t ofs, void *buf, ssize_t bufsz) in bs_write() argument 238 if (ofs < 0 || ofs > r->size - bufsz) { in bs_write() 245 switch (bufsz) { in bs_write() 263 s = write(r->fd, buf, bufsz); in bs_write() 264 if (s != bufsz) in bs_write()
|
/freebsd/tools/test/stress2/misc/ |
H A D | mmap42.sh | 33 size_t bufsz; 42 bufsz = sb.st_size; 43 buf = obuf = mmap(NULL, bufsz, PROT_READ, MAP_SHARED, mfd, 0); 53 while (bufsz > 0) { 54 wsz = write(fd, buf, bufsz); 59 bufsz -= wsz; 63 bufsz = sb.st_size;
|
H A D | mmap43.sh | 32 size_t bufsz; 41 bufsz = sb.st_size; 42 buf = obuf = mmap(NULL, bufsz, PROT_READ, MAP_SHARED, mfd, 0); 52 while (bufsz > 0) { 53 wsz = write(fd, buf, bufsz); 58 bufsz -= wsz; 62 bufsz = sb.st_size;
|
/freebsd/sys/contrib/dev/mediatek/mt76/mt7996/ |
H A D | debugfs.c | 134 static const size_t bufsz = 1024; in mt7996_sys_recovery_get() local 136 buff = kmalloc(bufsz, GFP_KERNEL); in mt7996_sys_recovery_get() 141 desc += scnprintf(buff + desc, bufsz - desc, in mt7996_sys_recovery_get() 143 desc += scnprintf(buff + desc, bufsz - desc, in mt7996_sys_recovery_get() 145 desc += scnprintf(buff + desc, bufsz - desc, in mt7996_sys_recovery_get() 147 desc += scnprintf(buff + desc, bufsz - desc, in mt7996_sys_recovery_get() 149 desc += scnprintf(buff + desc, bufsz - desc, in mt7996_sys_recovery_get() 151 desc += scnprintf(buff + desc, bufsz - desc, in mt7996_sys_recovery_get() 153 desc += scnprintf(buff + desc, bufsz - desc, in mt7996_sys_recovery_get() 155 desc += scnprintf(buff + desc, bufsz - desc, in mt7996_sys_recovery_get() [all …]
|
/freebsd/crypto/openssl/crypto/sha/ |
H A D | sha3.c | 18 ctx->bufsz = 0; in ossl_sha3_reset() 54 if ((num = ctx->bufsz) != 0) { /* process intermediate buffer? */ in ossl_sha3_update() 59 ctx->bufsz += len; in ossl_sha3_update() 70 ctx->bufsz = 0; in ossl_sha3_update() 81 ctx->bufsz = rem; in ossl_sha3_update() 90 size_t num = ctx->bufsz; in ossl_sha3_final()
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/cmd/ |
H A D | mkfile.c | 63 size_t bufsz = 0; in main() local 206 if (bufsz != st.st_blksize) { in main() 209 bufsz = (size_t)st.st_blksize; in main() 210 buf = calloc(1, bufsz); in main() 214 " size %d\n"), (int)bufsz); in main() 216 bufsz = 0; in main() 225 size_t bytes = (size_t)MIN(bufsz, size-written); in main()
|
/freebsd/sys/dev/sound/macio/ |
H A D | aoa.c | 65 u_int bufsz; /* buffer size */ member 77 KASSERT(dma->bufsz == sndbuf_getsize(dma->buf), ("bad size")); in aoa_dma_set_program() 79 dma->slots = dma->bufsz / dma->blksz; in aoa_dma_set_program() 129 dma->bufsz = AOA_BUFFER_SIZE; in aoa_dma_create() 164 if (blocksz > dma->bufsz) in aoa_chan_setblocksize() 165 blocksz = dma->bufsz; in aoa_chan_setblocksize() 167 err = sndbuf_resize(dma->buf, dma->bufsz / blocksz, blocksz); in aoa_chan_setblocksize() 177 err = dbdma_resize_channel(dma->channel, 2 + dma->bufsz / blocksz); in aoa_chan_setblocksize() 238 max_slots = 2 + dma->bufsz / dma->blksz; in aoa_chan_init() 246 if (sndbuf_alloc(dma->buf, dma->tag, 0, dma->bufsz) != 0) { in aoa_chan_init()
|
/freebsd/crypto/openssl/providers/implementations/ciphers/ |
H A D | ciphercommon.c | 194 ctx->bufsz = 0; in cipher_generic_init_internal() 337 if (ctx->bufsz != 0) in ossl_cipher_generic_block_update() 357 ctx->bufsz = 0; in ossl_cipher_generic_block_update() 416 } else if (ctx->bufsz == 0) { in ossl_cipher_generic_block_final() 419 } else if (ctx->bufsz != blksz) { in ossl_cipher_generic_block_final() 432 ctx->bufsz = 0; in ossl_cipher_generic_block_final() 438 if (ctx->bufsz != blksz) { in ossl_cipher_generic_block_final() 457 if (outsize < ctx->bufsz) { in ossl_cipher_generic_block_final() 461 memcpy(out, ctx->buf, ctx->bufsz); in ossl_cipher_generic_block_final() 462 *outl = ctx->bufsz; in ossl_cipher_generic_block_final() [all …]
|
/freebsd/lib/libveriexec/ |
H A D | veriexec_get.c | 99 veriexec_get_path_label(const char *file, char *buf, size_t bufsz) in veriexec_get_path_label() argument 108 if (buf != NULL && bufsz > params.labellen) { in veriexec_get_path_label() 109 strlcpy(buf, params.label, bufsz); in veriexec_get_path_label() 137 veriexec_get_pid_label(pid_t pid, char *buf, size_t bufsz) in veriexec_get_pid_label() argument 146 if (buf != NULL && bufsz > params.labellen) { in veriexec_get_pid_label() 147 strlcpy(buf, params.label, bufsz); in veriexec_get_pid_label()
|
/freebsd/stand/efi/libefi/ |
H A D | eficom.c | 95 UINTN bufsz = 0; in efi_serial_init() local 104 status = BS->LocateHandle(ByProtocol, &serial, NULL, &bufsz, handles); in efi_serial_init() 108 if ((handles = malloc(bufsz)) == NULL) in efi_serial_init() 111 *nhandles = (int)(bufsz / sizeof (EFI_HANDLE)); in efi_serial_init() 115 status = BS->LocateHandle(ByProtocol, &serial, NULL, &bufsz, handles); in efi_serial_init() 404 UINTN bufsz = 1; in comc_putchar() local 411 status = comc_port->sio->Write(comc_port->sio, &bufsz, &cb); in comc_putchar() 421 UINTN bufsz = 1; in comc_getchar() local 438 status = comc_port->sio->Read(comc_port->sio, &bufsz, &c); in comc_getchar() 439 if (EFI_ERROR(status) || bufsz == 0) in comc_getchar()
|
/freebsd/sys/contrib/openzfs/cmd/zstream/ |
H A D | zstream_recompress.c | 69 int bufsz = SPA_MAXBLOCKSIZE; in zstream_do_recompress() local 70 char *buf = safe_malloc(bufsz); in zstream_do_recompress() 168 if (sz > bufsz) { in zstream_do_recompress() 172 bufsz = sz; in zstream_do_recompress() 264 dbuf = safe_calloc(bufsz); in zstream_do_recompress() 275 payload_size, MIN(bufsz, in zstream_do_recompress() 292 MIN(payload_size, bufsz), (level == -1 ? in zstream_do_recompress()
|
/freebsd/sys/contrib/dev/mediatek/mt76/mt7915/ |
H A D | debugfs.c | 133 static const size_t bufsz = 1024; in mt7915_sys_recovery_get() local 135 buff = kmalloc(bufsz, GFP_KERNEL); in mt7915_sys_recovery_get() 140 desc += scnprintf(buff + desc, bufsz - desc, in mt7915_sys_recovery_get() 142 desc += scnprintf(buff + desc, bufsz - desc, in mt7915_sys_recovery_get() 144 desc += scnprintf(buff + desc, bufsz - desc, in mt7915_sys_recovery_get() 146 desc += scnprintf(buff + desc, bufsz - desc, in mt7915_sys_recovery_get() 148 desc += scnprintf(buff + desc, bufsz - desc, in mt7915_sys_recovery_get() 150 desc += scnprintf(buff + desc, bufsz - desc, in mt7915_sys_recovery_get() 152 desc += scnprintf(buff + desc, bufsz - desc, in mt7915_sys_recovery_get() 154 desc += scnprintf(buff + desc, bufsz - desc, in mt7915_sys_recovery_get() [all …]
|
/freebsd/sys/contrib/dev/iwlwifi/ |
H A D | iwl-io.c | 288 size_t bufsz = ARRAY_SIZE(rfh_tbl) * 53 + in iwl_dump_rfh() local 291 *buf = kmalloc(bufsz, GFP_KERNEL); in iwl_dump_rfh() 295 pos += scnprintf(*buf + pos, bufsz - pos, in iwl_dump_rfh() 299 pos += scnprintf(*buf + pos, bufsz - pos, in iwl_dump_rfh() 309 pos += scnprintf(*buf + pos, bufsz - pos, in iwl_dump_rfh() 377 size_t bufsz = ARRAY_SIZE(fh_tbl) * 48 + 40; in iwl_dump_fh() local 379 *buf = kmalloc(bufsz, GFP_KERNEL); in iwl_dump_fh() 383 pos += scnprintf(*buf + pos, bufsz - pos, in iwl_dump_fh() 387 pos += scnprintf(*buf + pos, bufsz - pos, in iwl_dump_fh()
|
/freebsd/sys/dev/sound/pci/ |
H A D | als4000.c | 84 unsigned int bufsz; member 267 if (blocksize > sc->bufsz / 2) { in alschan_setblocksize() 268 blocksize = sc->bufsz / 2; in alschan_setblocksize() 349 u_int32_t buf, bufsz, count, dma_prog; in als_playback_start() local 352 bufsz = sndbuf_getsize(ch->buffer); in als_playback_start() 353 count = bufsz / 2; in als_playback_start() 452 u_int32_t buf, bufsz, count, dma_prog; in als_capture_start() local 455 bufsz = sndbuf_getsize(ch->buffer); in als_capture_start() 456 count = bufsz / 2; in als_capture_start() 465 als_gcr_wr(sc, ALS_GCR_FIFO1_COUNT, (bufsz - 1)); in als_capture_start() [all …]
|
/freebsd/sys/netinet/cc/ |
H A D | cc.c | 202 size_t bufsz, outsz; in cc_list_available() local 213 bufsz = (nalgos+2) * ((TCP_CA_NAME_MAX + 13) + 1); in cc_list_available() 214 buffer = malloc(bufsz, M_TEMP, M_WAITOK); in cc_list_available() 217 linesz = snprintf(cp, bufsz, "\n%-16s%c %s\n", "CCmod", 'D', in cc_list_available() 220 bufsz -= linesz; in cc_list_available() 224 linesz = snprintf(cp, bufsz, "%-16s%c %u\n", in cc_list_available() 228 if (linesz >= bufsz) { in cc_list_available() 233 bufsz -= linesz; in cc_list_available()
|
/freebsd/crypto/openssl/providers/implementations/digests/ |
H A D | sha3_prov.c | 78 if ((num = ctx->bufsz) != 0) { in keccak_update() 84 ctx->bufsz += len; in keccak_update() 93 ctx->bufsz = 0; in keccak_update() 100 ctx->bufsz = rem; in keccak_update() 165 s390x_klmd(ctx->buf, ctx->bufsz, NULL, 0, ctx->pad, ctx->A); in s390x_sha3_final() 176 s390x_klmd(ctx->buf, ctx->bufsz, md, ctx->md_size, ctx->pad, ctx->A); in s390x_shake_final()
|