| /freebsd-13-stable/crypto/heimdal/lib/krb5/ |
| HD | crypto-evp.c | 101 size_t i, blocksize; in _krb5_evp_encrypt_cts() local 109 blocksize = EVP_CIPHER_CTX_block_size(c); in _krb5_evp_encrypt_cts() 111 if (len < blocksize) { in _krb5_evp_encrypt_cts() 115 } else if (len == blocksize) { in _krb5_evp_encrypt_cts() 129 i = ((len - 1) / blocksize) * blocksize; in _krb5_evp_encrypt_cts() 131 p += i - blocksize; in _krb5_evp_encrypt_cts() 133 memcpy(ivec2, p, blocksize); in _krb5_evp_encrypt_cts() 136 tmp[i] = p[i + blocksize] ^ ivec2[i]; in _krb5_evp_encrypt_cts() 137 for (; i < blocksize; i++) in _krb5_evp_encrypt_cts() 141 EVP_Cipher(c, p, tmp, blocksize); in _krb5_evp_encrypt_cts() [all …]
|
| /freebsd-13-stable/contrib/libarchive/libarchive/test/ |
| HD | test_write_format_tar.c | 36 size_t blocksize; in DEFINE_TEST() local 39 for (blocksize = 1; blocksize < 100000; blocksize += blocksize + 3) { in DEFINE_TEST() 47 archive_write_set_bytes_per_block(a, (int)blocksize)); in DEFINE_TEST() 49 archive_write_set_bytes_in_last_block(a, (int)blocksize)); in DEFINE_TEST() 50 assertEqualInt(blocksize, in DEFINE_TEST() 54 assertEqualInt(blocksize, in DEFINE_TEST() 83 failure("blocksize=%zu", blocksize); in DEFINE_TEST() 84 assertEqualInt(((2048 - 1)/blocksize+1)*blocksize, used); in DEFINE_TEST()
|
| HD | test_write_format_tar_sparse.c | 36 size_t blocksize; in test_1() local 45 for (blocksize = 1; blocksize < 100000; blocksize += blocksize + 3) { in test_1() 53 archive_write_set_bytes_per_block(a, (int)blocksize)); in test_1() 55 archive_write_set_bytes_in_last_block(a, (int)blocksize)); in test_1() 56 assertEqualInt(blocksize, in test_1() 60 assertEqualInt(blocksize, in test_1() 96 failure("blocksize=%zu", blocksize); in test_1() 97 assertEqualInt(((11264 - 1)/blocksize+1)*blocksize, used); in test_1() 179 size_t blocksize = 20 * 512; in test_2() local 194 archive_write_set_bytes_per_block(a, (int)blocksize)); in test_2() [all …]
|
| HD | test_write_filter_program.c | 36 int blocksize = 1024; in DEFINE_TEST() local 50 blocksize = 1; in DEFINE_TEST() 64 assertA(0 == archive_write_set_bytes_per_block(a, blocksize)); in DEFINE_TEST() 65 assertA(0 == archive_write_set_bytes_in_last_block(a, blocksize)); in DEFINE_TEST() 66 assertA(blocksize == archive_write_get_bytes_in_last_block(a)); in DEFINE_TEST() 68 assertA(blocksize == archive_write_get_bytes_in_last_block(a)); in DEFINE_TEST()
|
| HD | test_write_open_memory.c | 48 size_t blocksize = 94; in DEFINE_TEST() local 55 archive_write_set_bytes_per_block(a, (int)blocksize)); in DEFINE_TEST() 60 if (i < (511/blocksize)*blocksize) in DEFINE_TEST()
|
| /freebsd-13-stable/crypto/heimdal/appl/rsh/ |
| HD | common.c | 48 size_t blocksize; in init_ivecs() local 50 krb5_crypto_getblocksize(context, crypto, &blocksize); in init_ivecs() 52 ivec_in[0] = malloc(blocksize); in init_ivecs() 53 memset(ivec_in[0], client, blocksize); in init_ivecs() 56 ivec_in[1] = malloc(blocksize); in init_ivecs() 57 memset(ivec_in[1], 2 | client, blocksize); in init_ivecs() 61 ivec_out[0] = malloc(blocksize); in init_ivecs() 62 memset(ivec_out[0], !client, blocksize); in init_ivecs() 65 ivec_out[1] = malloc(blocksize); in init_ivecs() 66 memset(ivec_out[1], 2 | !client, blocksize); in init_ivecs()
|
| /freebsd-13-stable/sys/contrib/openzfs/module/zfs/ |
| HD | dmu_object.c | 47 dmu_object_alloc_impl(objset_t *os, dmu_object_type_t ot, int blocksize, in dmu_object_alloc_impl() argument 191 dnode_allocate(dn, ot, blocksize, in dmu_object_alloc_impl() 226 dmu_object_alloc(objset_t *os, dmu_object_type_t ot, int blocksize, in dmu_object_alloc() argument 229 return dmu_object_alloc_impl(os, ot, blocksize, 0, bonustype, in dmu_object_alloc() 234 dmu_object_alloc_ibs(objset_t *os, dmu_object_type_t ot, int blocksize, in dmu_object_alloc_ibs() argument 238 return dmu_object_alloc_impl(os, ot, blocksize, indirect_blockshift, in dmu_object_alloc_ibs() 243 dmu_object_alloc_dnsize(objset_t *os, dmu_object_type_t ot, int blocksize, in dmu_object_alloc_dnsize() argument 246 return (dmu_object_alloc_impl(os, ot, blocksize, 0, bonustype, in dmu_object_alloc_dnsize() 256 dmu_object_alloc_hold(objset_t *os, dmu_object_type_t ot, int blocksize, in dmu_object_alloc_hold() argument 260 return (dmu_object_alloc_impl(os, ot, blocksize, indirect_blockshift, in dmu_object_alloc_hold() [all …]
|
| /freebsd-13-stable/sys/opencrypto/ |
| HD | xform_sha2.c | 68 .blocksize = SHA2_224_BLOCK_LEN, 80 .blocksize = SHA2_256_BLOCK_LEN, 92 .blocksize = SHA2_384_BLOCK_LEN, 104 .blocksize = SHA2_512_BLOCK_LEN, 117 .blocksize = SHA2_224_BLOCK_LEN, 129 .blocksize = SHA2_256_BLOCK_LEN, 141 .blocksize = SHA2_384_BLOCK_LEN, 153 .blocksize = SHA2_512_BLOCK_LEN,
|
| HD | xform_gmac.c | 58 .blocksize = AES_ICM_BLOCK_LEN, 71 .blocksize = GMAC_BLOCK_LEN, 85 .blocksize = GMAC_BLOCK_LEN, 99 .blocksize = GMAC_BLOCK_LEN,
|
| /freebsd-13-stable/contrib/subversion/subversion/libsvn_subr/ |
| HD | spillbuf.c | 45 apr_size_t blocksize; member 119 apr_size_t blocksize, in init_spillbuf_extended() argument 127 buf->blocksize = blocksize; in init_spillbuf_extended() 138 apr_size_t blocksize, in init_spillbuf() argument 142 init_spillbuf_extended(buf, blocksize, maxsize, in init_spillbuf() 148 svn_spillbuf__create(apr_size_t blocksize, in svn_spillbuf__create() argument 153 init_spillbuf(buf, blocksize, maxsize, result_pool); in svn_spillbuf__create() 159 svn_spillbuf__create_extended(apr_size_t blocksize, in svn_spillbuf__create_extended() argument 167 init_spillbuf_extended(buf, blocksize, maxsize, in svn_spillbuf__create_extended() 213 mem->data = apr_palloc(buf->pool, buf->blocksize); in get_buffer() [all …]
|
| /freebsd-13-stable/lib/libc/gen/ |
| HD | getbsize.c | 43 long n, max, mul, blocksize; in getbsize() local 90 if ((blocksize = n * mul) < 512) { in getbsize() 93 blocksize = n = 512; in getbsize() 96 blocksize = n = 512; in getbsize() 100 *blocksizep = blocksize; in getbsize()
|
| /freebsd-13-stable/usr.bin/du/ |
| HD | du.c | 85 static long blocksize, cblocksize; variable 118 blocksize = 0; in main() 172 blocksize = 1073741824; in main() 179 blocksize = 1024; in main() 186 blocksize = 1048576; in main() 250 if (blocksize == 0) in main() 251 (void)getbsize(¬used, &blocksize); in main() 255 blocksize /= DEV_BSIZE; in main() 260 blocksize); in main() 287 cblocksize, blocksize)) { in main() [all …]
|
| /freebsd-13-stable/stand/usb/storage/ |
| HD | umass_loader.c | 116 uint32_t blocksize; in umass_disk_open_sub() local 118 if (usb_msc_read_capacity(umass_uaa.device, 0, &nblock, &blocksize) != 0) in umass_disk_open_sub() 121 return (disk_open(dev, ((uint64_t)nblock + 1) * (uint64_t)blocksize, blocksize)); in umass_disk_open_sub() 146 uint32_t blocksize; in umass_disk_ioctl() local 161 &nblock, &blocksize) != 0) in umass_disk_ioctl() 167 *(uint32_t*)buf = blocksize; in umass_disk_ioctl()
|
| /freebsd-13-stable/sys/contrib/libsodium/test/default/ |
| HD | sodium_utils.c | 18 size_t blocksize; in main() local 147 blocksize = 1U + randombytes_uniform(100U); in main() 148 bin_padded_maxlen = bin_len + (blocksize - bin_len % blocksize); in main() 153 blocksize, bin_padded_maxlen - 1U) == -1); in main() 155 blocksize, bin_padded_maxlen + 1U) == 0); in main() 157 blocksize, bin_padded_maxlen + 1U) == 0); in main() 161 blocksize, bin_padded_maxlen) == 0); in main() 169 blocksize) == 0); in main()
|
| /freebsd-13-stable/sys/dev/ocs_fc/ |
| HD | ocs_utils.c | 1313 uint32_t blocksize = 0; in ocs_scsi_dif_blocksize() local 1316 case OCS_SCSI_DIF_BK_SIZE_512: blocksize = 512; break; in ocs_scsi_dif_blocksize() 1317 case OCS_SCSI_DIF_BK_SIZE_1024: blocksize = 1024; break; in ocs_scsi_dif_blocksize() 1318 case OCS_SCSI_DIF_BK_SIZE_2048: blocksize = 2048; break; in ocs_scsi_dif_blocksize() 1319 case OCS_SCSI_DIF_BK_SIZE_4096: blocksize = 4096; break; in ocs_scsi_dif_blocksize() 1320 case OCS_SCSI_DIF_BK_SIZE_520: blocksize = 520; break; in ocs_scsi_dif_blocksize() 1321 case OCS_SCSI_DIF_BK_SIZE_4104: blocksize = 4104; break; in ocs_scsi_dif_blocksize() 1326 return blocksize; in ocs_scsi_dif_blocksize() 1342 ocs_scsi_dif_set_blocksize(ocs_scsi_dif_info_t *dif_info, uint32_t blocksize) in ocs_scsi_dif_set_blocksize() argument 1346 switch(blocksize) { in ocs_scsi_dif_set_blocksize() [all …]
|
| /freebsd-13-stable/crypto/openssl/crypto/ec/ |
| HD | ec_mult.c | 33 size_t blocksize; /* block size for wNAF splitting */ member 59 ret->blocksize = 8; /* default */ in ec_pre_comp_new() 410 size_t blocksize = 0, numblocks = 0; /* for wNAF splitting */ in ec_wNAF_mul() local 473 blocksize = pre_comp->blocksize; in ec_wNAF_mul() 479 numblocks = (BN_num_bits(scalar) / blocksize) + 1; in ec_wNAF_mul() 592 if (tmp_len < numblocks * blocksize) { in ec_wNAF_mul() 596 numblocks = (tmp_len + blocksize - 1) / blocksize; in ec_wNAF_mul() 611 wNAF_len[i] = blocksize; in ec_wNAF_mul() 612 if (tmp_len < blocksize) { in ec_wNAF_mul() 617 tmp_len -= blocksize; in ec_wNAF_mul() [all …]
|
| /freebsd-13-stable/sys/cam/ctl/ |
| HD | ctl_backend_ramdisk.c | 373 lbas = io->scsiio.kern_data_len / cbe_lun->blocksize; in ctl_backend_ramdisk_cmp() 380 page += lbaoff * cbe_lun->blocksize; in ctl_backend_ramdisk_cmp() 382 cbe_lun->blocksize); in ctl_backend_ramdisk_cmp() 384 if (res < cbe_lun->blocksize) in ctl_backend_ramdisk_cmp() 442 lbas = MIN(lbas, 131072 / cbe_lun->blocksize); in ctl_backend_ramdisk_compare() 443 len = lbas * cbe_lun->blocksize; in ctl_backend_ramdisk_compare() 470 off = lbaoff * cbe_lun->blocksize; in ctl_backend_ramdisk_rw() 476 len = lbas * cbe_lun->blocksize; in ctl_backend_ramdisk_rw() 502 io->scsiio.kern_data_len = lbas * cbe_lun->blocksize; in ctl_backend_ramdisk_rw() 633 memset(page + lbaoff * cbe_lun->blocksize, 0, in ctl_backend_ramdisk_delete() [all …]
|
| HD | ctl_backend_block.c | 799 off = roff = ((off_t)lbalen->lba) * be_lun->cbe_lun.blocksize; in ctl_be_block_gls_file() 819 scsi_ulto4b(MIN(UINT32_MAX, off / be_lun->cbe_lun.blocksize - in ctl_be_block_gls_file() 841 val = vattr.va_bytes / be_lun->cbe_lun.blocksize; in ctl_be_block_getattr_file() 848 be_lun->cbe_lun.blocksize; in ctl_be_block_getattr_file() 978 off = roff = ((off_t)lbalen->lba) * be_lun->cbe_lun.blocksize; in ctl_be_block_gls_zvol() 998 scsi_ulto4b(MIN(UINT32_MAX, off / be_lun->cbe_lun.blocksize - in ctl_be_block_gls_zvol() 1060 maxlen = LONG_MAX - (LONG_MAX % be_lun->cbe_lun.blocksize); in ctl_be_block_unmap_dev_range() 1070 bio->bio_pblkno = off / be_lun->cbe_lun.blocksize; in ctl_be_block_unmap_dev_range() 1115 be_lun->cbe_lun.blocksize; in ctl_be_block_unmap_dev() 1118 scsi_8btou64(buf->lba) * be_lun->cbe_lun.blocksize, in ctl_be_block_unmap_dev() [all …]
|
| /freebsd-13-stable/usr.bin/hexdump/ |
| HD | hexdump.c | 55 int blocksize; /* data block size */ variable 73 for (blocksize = 0, tfs = fshead; tfs; tfs = tfs->nextfs) { in main() 75 if (blocksize < tfs->bcnt) in main() 76 blocksize = tfs->bcnt; in main()
|
| HD | display.c | 139 blocksize - address % blocksize); in print() 246 if ((curp = calloc(1, blocksize)) == NULL) in get() 248 if ((savp = calloc(1, blocksize)) == NULL) in get() 254 address += blocksize; in get() 257 for (need = blocksize, nread = 0;;) { in get() 266 if (need == blocksize) in get() 301 bcmp(curp, savp, blocksize) != 0) { in get() 309 address += blocksize; in get() 310 need = blocksize; in get()
|
| /freebsd-13-stable/contrib/apr/file_io/unix/ |
| HD | readwrite.c | 33 apr_uint64_t blocksize; in file_read_buffered() local 71 …blocksize = size > thefile->dataRead - thefile->bufpos ? thefile->dataRead - thefile->bufpos : siz… in file_read_buffered() 72 memcpy(pos, thefile->buffer + thefile->bufpos, blocksize); in file_read_buffered() 73 thefile->bufpos += blocksize; in file_read_buffered() 74 pos += blocksize; in file_read_buffered() 75 size -= blocksize; in file_read_buffered() 153 int blocksize; in apr_file_write() local 174 blocksize = size > thefile->bufsize - thefile->bufpos ? in apr_file_write() 176 memcpy(thefile->buffer + thefile->bufpos, pos, blocksize); in apr_file_write() 177 thefile->bufpos += blocksize; in apr_file_write() [all …]
|
| /freebsd-13-stable/sys/geom/eli/ |
| HD | g_eli_key_cache.c | 201 size_t blocksize; in g_eli_key_init() local 208 blocksize = pp->sectorsize; in g_eli_key_init() 211 blocksize = sc->sc_sectorsize; in g_eli_key_init() 214 ((mediasize - 1) >> G_ELI_KEY_SHIFT) / blocksize + 1; in g_eli_key_init() 256 size_t blocksize; in g_eli_key_resize() local 269 blocksize = pp->sectorsize; in g_eli_key_resize() 272 blocksize = sc->sc_sectorsize; in g_eli_key_resize() 274 new_ekeys_total = ((mediasize - 1) >> G_ELI_KEY_SHIFT) / blocksize + 1; in g_eli_key_resize() 303 g_eli_key_hold(struct g_eli_softc *sc, off_t offset, size_t blocksize) in g_eli_key_hold() argument 312 keyno = (offset >> G_ELI_KEY_SHIFT) / blocksize; in g_eli_key_hold()
|
| /freebsd-13-stable/crypto/openssl/crypto/engine/ |
| HD | eng_devcrypto.c | 66 unsigned int blocksize, num; member 71 int blocksize; member 167 cipher_ctx->blocksize = cipher_d->blocksize; in cipher_init() 239 nblocks = (inl + cipher_ctx->blocksize - 1) in cipher_do_cipher() 240 / cipher_ctx->blocksize; in cipher_do_cipher() 268 cipher_ctx->num = (cipher_ctx->num + 1) % cipher_ctx->blocksize; in ctr_do_cipher() 272 if (inl > (unsigned int) cipher_ctx->blocksize) { in ctr_do_cipher() 273 nblocks = inl/cipher_ctx->blocksize; in ctr_do_cipher() 274 len = nblocks * cipher_ctx->blocksize; in ctr_do_cipher() 284 memset(cipher_ctx->partial, 0, cipher_ctx->blocksize); in ctr_do_cipher() [all …]
|
| /freebsd-13-stable/sys/kern/ |
| HD | kern_shutdown.c | 1034 kerneldumpcrypto_create(size_t blocksize, uint8_t encryption, in kerneldumpcrypto_create() argument 1041 dumpkeysize = roundup2(sizeof(*kdk) + encryptedkeysize, blocksize); in kerneldumpcrypto_create() 1211 newdi->kdcrypto = kerneldumpcrypto_create(newdi->blocksize, in dumper_create() 1243 newdi->blockbuf = malloc(newdi->blocksize, M_DUMPER, M_WAITOK | M_ZERO); in dumper_create() 1401 if (length % di->blocksize != 0) { in dump_check_bounds() 1406 if (offset % di->blocksize != 0) { in dump_check_bounds() 1482 if (length % di->blocksize != 0) { in kerneldumpcomp_write_cb() 1489 rlength = rounddown(length, di->blocksize); in kerneldumpcomp_write_cb() 1497 bzero((uint8_t *)di->blockbuf + resid, di->blocksize - resid); in kerneldumpcomp_write_cb() 1522 if (hdrsz > di->blocksize) in dump_write_headers() [all …]
|
| /freebsd-13-stable/sys/contrib/libsodium/src/libsodium/sodium/ |
| HD | utils.c | 667 size_t unpadded_buflen, size_t blocksize, size_t max_buflen) in sodium_pad() argument 676 if (blocksize <= 0U) { in sodium_pad() 679 xpadlen = blocksize - 1U; in sodium_pad() 680 if ((blocksize & (blocksize - 1U)) == 0U) { in sodium_pad() 681 xpadlen -= unpadded_buflen & (blocksize - 1U); in sodium_pad() 683 xpadlen -= unpadded_buflen % blocksize; in sodium_pad() 697 for (i = 0; i < blocksize; i++) { in sodium_pad() 707 size_t padded_buflen, size_t blocksize) in sodium_unpad() argument 717 if (padded_buflen < blocksize || blocksize <= 0U) { in sodium_unpad() 722 for (i = 0U; i < blocksize; i++) { in sodium_unpad()
|