Home
last modified time | relevance | path

Searched refs:bufsz (Results 1 – 25 of 148) sorted by relevance

123456

/freebsd/contrib/ofed/libibmad/
H A Ddump.c47 void mad_dump_int(char *buf, int bufsz, void *val, int valsz) in mad_dump_int() argument
51 snprintf(buf, bufsz, "%d", *(uint32_t *) val & 0xff); in mad_dump_int()
54 snprintf(buf, bufsz, "%d", *(uint32_t *) val & 0xffff); in mad_dump_int()
58 snprintf(buf, bufsz, "%d", *(uint32_t *) val); in mad_dump_int()
64 snprintf(buf, bufsz, "%" PRIu64, *(uint64_t *) val); in mad_dump_int()
72 void mad_dump_uint(char *buf, int bufsz, void *val, int valsz) in mad_dump_uint() argument
76 snprintf(buf, bufsz, "%u", *(uint32_t *) val & 0xff); in mad_dump_uint()
79 snprintf(buf, bufsz, "%u", *(uint32_t *) val & 0xffff); in mad_dump_uint()
83 snprintf(buf, bufsz, "%u", *(uint32_t *) val); in mad_dump_uint()
89 snprintf(buf, bufsz, "%" PRIu64, *(uint64_t *) val); in mad_dump_uint()
[all …]
/freebsd/contrib/libder/tests/
H A Dtest_pubkey.c51 test_construction(struct libder_ctx*ctx, const uint8_t *buf, size_t bufsz) in test_construction() argument
82 assert(outsz == bufsz); in test_construction()
83 assert(memcmp(out, buf, bufsz) == 0); in test_construction()
96 size_t bufsz, outsz, rootsz; in main() local
111 bufsz = sb.st_size; in main()
112 buf = malloc(bufsz); in main()
115 readsz = read(fd, buf, bufsz); in main()
118 assert(readsz == bufsz); in main()
121 rootsz = bufsz; in main()
126 assert(rootsz == bufsz); in main()
[all …]
H A Dtest_privkey.c67 test_construction(struct libder_ctx *ctx, const uint8_t *buf, size_t bufsz) in test_construction() argument
113 assert(outsz == bufsz); in test_construction()
115 assert(memcmp(out, buf, bufsz) == 0); in test_construction()
128 size_t bufsz, outsz, rootsz; in main() local
143 bufsz = sb.st_size; in main()
144 buf = malloc(bufsz); in main()
147 readsz = read(fd, buf, bufsz); in main()
150 assert(readsz == bufsz); in main()
153 rootsz = bufsz; in main()
158 assert(rootsz == bufsz); in main()
[all …]
/freebsd/crypto/openssl/apps/lib/
H A Dapp_params.c13 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/libder/libder/
H A Dlibder_write.c16 size_t bufsz; member
158 left = mwrite->bufsz - mwrite->offset; in memory_write()
176 size_t *bufsz) in libder_write() argument
186 if ((buf == NULL && *bufsz != 0) || (buf != NULL && *bufsz == 0)) in libder_write()
202 if (*bufsz == 0) { in libder_write()
203 *bufsz = needed; in libder_write()
207 } else if (needed > *bufsz) { in libder_write()
208 *bufsz = needed; in libder_write()
214 mwrite.bufsz = *bufsz; in libder_write()
226 *bufsz = mwrite.offset; in libder_write()
/freebsd/contrib/mandoc/
H A Dcompat_getline.c25 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/tests/sys/kern/tty/
H A Dreadsz.c32 size_t bufsz = 0, reps; in main() local
64 bufsz = strtonum(optarg, 1, SSIZE_MAX, &errstr); in main()
73 if (bufsz == 0) { in main()
75 bufsz = reps; in main()
77 bufsz = LINE_MAX; in main()
80 buf = malloc(bufsz); in main()
92 readsz = MIN(bufsz, reps); in main()
94 readsz = bufsz; in main()
/freebsd/sys/contrib/dev/iwlwifi/mvm/
H A Ddebugfs-vif.c144 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
164 pos = iwl_mvm_power_mac_dbgfs_read(mvm, vif, buf, bufsz); in iwl_dbgfs_pm_params_read()
179 int bufsz = sizeof(buf); in iwl_dbgfs_mac_params_read() local
189 pos += scnprintf(buf+pos, bufsz-pos, "type: ibss\n"); in iwl_dbgfs_mac_params_read()
192 pos += scnprintf(buf+pos, bufsz-pos, "type: bss\n"); in iwl_dbgfs_mac_params_read()
195 pos += scnprintf(buf+pos, bufsz-pos, "type: ap\n"); in iwl_dbgfs_mac_params_read()
198 pos += scnprintf(buf+pos, bufsz-pos, "type: p2p client\n"); in iwl_dbgfs_mac_params_read()
201 pos += scnprintf(buf+pos, bufsz-pos, "type: p2p go\n"); in iwl_dbgfs_mac_params_read()
[all …]
H A Ddebugfs.c319 int bufsz = sizeof(buf); in iwl_dbgfs_sar_geo_profile_read()
333 pos = scnprintf(buf, bufsz, in iwl_dbgfs_sar_geo_profile_read()
336 pos += scnprintf(buf + pos, bufsz - pos, in iwl_dbgfs_sar_geo_profile_read()
338 pos += scnprintf(buf + pos, bufsz - pos, in iwl_dbgfs_sar_geo_profile_read()
343 pos += scnprintf(buf + pos, bufsz - pos, in iwl_dbgfs_sar_geo_profile_read()
379 int i, pos = 0, bufsz = sizeof(buf); in iwl_dbgfs_stations_read()
384 pos += scnprintf(buf + pos, bufsz - pos, "%.2d: ", i); in iwl_dbgfs_stations_read()
388 pos += scnprintf(buf + pos, bufsz - pos, "N/A\n"); in iwl_dbgfs_stations_read()
390 pos += scnprintf(buf + pos, bufsz - pos, "%ld\n", in iwl_dbgfs_stations_read()
393 pos += scnprintf(buf + pos, bufsz in iwl_dbgfs_stations_read()
310 int bufsz = sizeof(buf); iwl_dbgfs_sar_geo_profile_read() local
372 int i, pos = 0, bufsz = sizeof(buf); iwl_dbgfs_stations_read() local
403 static const size_t bufsz = 2048; iwl_dbgfs_rs_data_read() local
495 int bufsz = sizeof(buf); iwl_dbgfs_disable_power_off_read() local
535 iwl_mvm_coex_dump_mbox(struct iwl_bt_coex_profile_notif * notif,char * buf,int pos,int bufsz) iwl_mvm_coex_dump_mbox() argument
599 int ret, pos = 0, bufsz = sizeof(char) * 1024; iwl_dbgfs_bt_notif_read() local
643 int bufsz = sizeof(buf); iwl_dbgfs_bt_cmd_read() local
718 static const size_t bufsz = 1024; iwl_dbgfs_fw_ver_read() local
755 static const size_t bufsz = 1024; iwl_dbgfs_tas_get_status_read() local
938 size_t bufsz; iwl_dbgfs_phy_integration_ver_read() local
971 size_t bufsz; iwl_dbgfs_fw_rx_stats_read() local
1159 static const size_t bufsz = 1024; iwl_dbgfs_frame_stats_read() local
1279 const size_t bufsz = sizeof(buf); iwl_dbgfs_scan_ant_rxchain_read() local
1527 const size_t bufsz = sizeof(buf); iwl_dbgfs_fw_dbg_conf_read() local
1597 MVM_DEBUGFS_WRITE_FILE_OPS(name,bufsz) global() argument
1599 MVM_DEBUGFS_READ_WRITE_FILE_OPS(name,bufsz) global() argument
1698 MVM_DEBUGFS_WRITE_LINK_STA_FILE_OPS(name,bufsz) global() argument
1714 MVM_DEBUGFS_READ_WRITE_LINK_STA_FILE_OPS(name,bufsz) global() argument
1738 const size_t bufsz = sizeof(buf); iwl_dbgfs_prph_reg_read() local
1888 size_t bufsz = sizeof(buf); iwl_dbgfs_uapsd_noagg_bssids_read() local
[all...]
H A Dpower.c715 int bufsz) in iwl_mvm_power_mac_dbgfs_read()
725 pos += scnprintf(buf+pos, bufsz-pos, "power_scheme = %d\n", in iwl_mvm_power_mac_dbgfs_read()
727 pos += scnprintf(buf+pos, bufsz-pos, "flags = 0x%x\n", in iwl_mvm_power_mac_dbgfs_read()
729 pos += scnprintf(buf+pos, bufsz-pos, "keep_alive = %d\n", in iwl_mvm_power_mac_dbgfs_read()
735 pos += scnprintf(buf+pos, bufsz-pos, "skip_over_dtim = %d\n", in iwl_mvm_power_mac_dbgfs_read()
738 pos += scnprintf(buf+pos, bufsz-pos, "skip_dtim_periods = %d\n", in iwl_mvm_power_mac_dbgfs_read()
741 pos += scnprintf(buf+pos, bufsz-pos, "rx_data_timeout = %d\n", in iwl_mvm_power_mac_dbgfs_read()
743 pos += scnprintf(buf+pos, bufsz-pos, "tx_data_timeout = %d\n", in iwl_mvm_power_mac_dbgfs_read()
747 pos += scnprintf(buf+pos, bufsz-pos, in iwl_mvm_power_mac_dbgfs_read()
754 pos += scnprintf(buf+pos, bufsz in iwl_mvm_power_mac_dbgfs_read()
702 iwl_mvm_power_mac_dbgfs_read(struct iwl_mvm * mvm,struct ieee80211_vif * vif,char * buf,int bufsz) iwl_mvm_power_mac_dbgfs_read() argument
[all...]
/freebsd/contrib/elftoolchain/libelf/
H A Dlibelf_open.c53 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 Dunaligned_io.c53 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/tools/bus_space/
H A Dbus.c130 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/bin/pkill/tests/
H A Dspin_helper.c60 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/test/stress2/misc/
H A Dmmap42.sh33 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 Dzfs18.sh35 size_t bufsz;
44 bufsz = sb.st_size;
45 buf = obuf = mmap(NULL, bufsz, PROT_READ, MAP_SHARED, mfd, 0);
55 while (bufsz > 0) {
56 wsz = write(fd, buf, bufsz);
61 bufsz -= wsz;
65 bufsz = sb.st_size;
H A Dmmap43.sh32 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 Ddebugfs.c134 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 Dsha3.c18 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/dev/sound/macio/
H A Daoa.c65 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 Dciphercommon.c194 ctx->bufsz = 0; in cipher_generic_init_internal()
337 if (ctx->bufsz != 0) in ossl_cipher_generic_block_update()
338 nextblocks = ossl_cipher_fillblock(ctx->buf, &ctx->bufsz, blksz, in ossl_cipher_generic_block_update()
348 if (ctx->bufsz == blksz && (ctx->enc || inl > 0 || !ctx->pad)) { in ossl_cipher_generic_block_update()
357 ctx->bufsz = 0; in ossl_cipher_generic_block_update()
384 && !ossl_cipher_trailingdata(ctx->buf, &ctx->bufsz, blksz, &in, &inl)) { in ossl_cipher_generic_block_update()
415 ossl_cipher_padblock(ctx->buf, &ctx->bufsz, blksz); in ossl_cipher_generic_block_final()
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()
[all …]
/freebsd/sys/contrib/openzfs/tests/zfs-tests/cmd/
H A Dmkfile.c63 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/tools/tools/so_splice/
H A Dproxy.c48 size_t bufsz; member
77 buf = malloc(sc->bufsz); in proxy_copy()
95 n = read(rs, buf, sc->bufsz); in proxy_copy()
388 size_t bufsz, enum proxy_mode mode, bool loopback) in proxy_init() argument
393 sc->bufsz = bufsz; in proxy_init()
403 size_t bufsz; in main() local
412 bufsz = 2 * 1024 * 1024ul; in main()
431 bufsz = atoi(optarg); in main()
445 proxy_init(&sc, laddr, taddr, bufsz, mode, loopback); in main()
/freebsd/lib/libveriexec/
H A Dveriexec_get.c99 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 Deficom.c95 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()

123456