| /freebsd-14.2/contrib/libcbor/test/ |
| H A D | bytestring_test.c | 12 cbor_item_t *bs; variable 144 assert_null(bs); in test_empty_bs() 157 assert_null(bs); in test_embedded_bs() 162 assert_null(bs); in test_notenough_data() 176 assert_null(bs); in test_short_bs1() 188 assert_null(bs); in test_short_bs2() 200 assert_null(bs); in test_half_bs() 212 assert_null(bs); in test_int_bs() 224 assert_null(bs); in test_long_bs() 238 assert_null(bs); in test_zero_indef() [all …]
|
| /freebsd-14.2/sys/geom/virstor/ |
| H A D | binstream.c | 58 *(bs->data + bs->pos + len) = *data; in bs_write_str() 71 *(bs->data + bs->pos + i) = *(data + i); in bs_write_buf() 80 *((uint8_t *) (bs->data + bs->pos)) = data; in bs_write_u8() 88 le16enc(bs->data + bs->pos, data); in bs_write_u16() 96 le32enc(bs->data + bs->pos, data); in bs_write_u32() 104 le64enc(bs->data + bs->pos, data); in bs_write_u64() 130 *work_buf = *(bs->data + bs->pos + len); in bs_read_str() 143 *(buf + i) = *(bs->data + bs->pos + i); in bs_read_buf() 151 uint16_t data = le16dec(bs->data + bs->pos); in bs_read_u16() 160 uint32_t data = le32dec(bs->data + bs->pos); in bs_read_u32() [all …]
|
| H A D | g_virstor_md.c | 43 bin_stream_t bs; in virstor_metadata_encode() local 45 bs_open(&bs, data); in virstor_metadata_encode() 52 bs_write_u32(&bs, md->md_id); in virstor_metadata_encode() 53 bs_write_u16(&bs, md->md_count); in virstor_metadata_encode() 56 bs_write_u16(&bs, md->no); in virstor_metadata_encode() 61 bs_write_u16(&bs, md->flags); in virstor_metadata_encode() 71 bin_stream_t bs; in virstor_metadata_decode() local 73 bs_open(&bs, (char *)(data)); in virstor_metadata_decode() 80 md->md_id = bs_read_u32(&bs); in virstor_metadata_decode() 84 md->no = bs_read_u16(&bs); in virstor_metadata_decode() [all …]
|
| H A D | binstream.h | 44 void bs_open (bin_stream_t * bs, void *data); 47 void bs_reset (bin_stream_t * bs); 50 unsigned bs_write_str(bin_stream_t * bs, char *data); 56 unsigned bs_write_u8(bin_stream_t * bs, uint8_t data); 59 unsigned bs_write_u16(bin_stream_t * bs, uint16_t data); 62 unsigned bs_write_u32(bin_stream_t * bs, uint32_t data); 65 unsigned bs_write_u64(bin_stream_t * bs, uint64_t data); 78 uint8_t bs_read_u8(bin_stream_t * bs); 81 uint16_t bs_read_u16(bin_stream_t * bs); 84 uint32_t bs_read_u32(bin_stream_t * bs); [all …]
|
| /freebsd-14.2/sys/net/ |
| H A D | bridgestp.c | 468 BSTP_LOCK(bs); in bstp_input() 806 bs->bs_root_pv = bs->bs_bridge_pv; in bstp_assign_roles() 808 bs->bs_root_max_age = bs->bs_bridge_max_age; in bstp_assign_roles() 809 bs->bs_root_fdelay = bs->bs_bridge_fdelay; in bstp_assign_roles() 810 bs->bs_root_htime = bs->bs_bridge_htime; in bstp_assign_roles() 1458 bs->bs_root_max_age + bs->bs_root_fdelay); in bstp_set_timer_tc() 1936 callout_reset(&bs->bs_bstpcallout, hz, bstp_tick, bs); in bstp_tick() 2109 callout_reset(&bs->bs_bstpcallout, hz, bstp_tick, bs); in bstp_reinit() 2126 bs->bs_root_pv = bs->bs_bridge_pv; in bstp_reinit() 2165 callout_init_mtx(&bs->bs_bstpcallout, &bs->bs_mtx, 0); in bstp_attach() [all …]
|
| /freebsd-14.2/contrib/bzip2/ |
| H A D | bzip2recover.c | 159 bs->buffer = 0; in bsOpenReadStream() 161 bs->mode = 'r'; in bsOpenReadStream() 162 return bs; in bsOpenReadStream() 172 bs->buffer = 0; in bsOpenWriteStream() 174 bs->mode = 'w'; in bsOpenWriteStream() 175 return bs; in bsOpenWriteStream() 183 Int32 retVal = putc ( (UChar) bs->buffer, bs->handle ); in bsPutBit() 189 bs->buffer = ( (bs->buffer << 1) | (bit & 0x1) ); in bsPutBit() 203 return ( ((bs->buffer) >> (bs->buffLive)) & 0x1 ); in bsGetBit() 227 retVal = putc ( (UChar) (bs->buffer), bs->handle ); in bsClose() [all …]
|
| /freebsd-14.2/contrib/netbsd-tests/include/ |
| H A D | t_bitstring.c | 67 bitstr_t *bs; in calculate_data() local 81 bs = bit_alloc(test_length); in calculate_data() 82 clearbits(bs, test_length); in calculate_data() 88 printbits(file, bs, test_length); in calculate_data() 92 bit_set(bs, i); in calculate_data() 97 printbits(file, bs, test_length); in calculate_data() 101 bit_clear(bs, i); in calculate_data() 113 clearbits(bs, test_length); in calculate_data() 192 bit_nclear(bs, i, i); in calculate_data() 200 bit_nset(bs, i, i); in calculate_data() [all …]
|
| /freebsd-14.2/contrib/bsddialog/lib/ |
| H A D | messagebox.c | 103 struct buttons bs) in do_message() argument 136 retval = bs.value[bs.curr]; in do_message() 146 bs.curr = (bs.curr + 1) % bs.nbuttons; in do_message() 151 if (bs.curr > 0) { in do_message() 152 bs.curr--; in do_message() 158 if (bs.curr < (int)bs.nbuttons - 1) { in do_message() 159 bs.curr++; in do_message() 203 NULL, bs) != 0) in do_message() 224 retval = bs.value[bs.curr]; in do_message() 240 struct buttons bs; in bsddialog_msgbox() local [all …]
|
| H A D | timebox.c | 144 bs) != 0) in bsddialog_timebox() 179 retval = bs.value[bs.curr]; in bsddialog_timebox() 192 bs.curr++; in bsddialog_timebox() 193 focusbuttons = bs.curr < (int)bs.nbuttons ? in bsddialog_timebox() 211 bs.curr--; in bsddialog_timebox() 221 bs.curr = (int)bs.nbuttons - 1; in bsddialog_timebox() 289 retval = bs.value[bs.curr]; in bsddialog_timebox() 397 retval = bs.value[bs.curr]; in bsddialog_datebox() 411 focusbuttons = bs.curr < (int)bs.nbuttons ? in bsddialog_datebox() 439 bs.curr = (int)bs.nbuttons - 1; in bsddialog_datebox() [all …]
|
| H A D | lib_util.c | 248 wbuttons = bs.nbuttons * bs.sizebutton; in draw_buttons() 256 bs.first[i], i == bs.curr, shortcut); in draw_buttons() 284 bs->value[bs->nbuttons] = BSDDIALOG_EXTRA; in get_buttons() 289 bs->label[bs->nbuttons] = conf->button.cancel_label ? in get_buttons() 291 bs->value[bs->nbuttons] = BSDDIALOG_CANCEL; in get_buttons() 293 bs->curr = bs->nbuttons; in get_buttons() 300 bs->value[bs->nbuttons] = BSDDIALOG_HELP; in get_buttons() 306 bs->value[bs->nbuttons] = BSDDIALOG_GENERIC1; in get_buttons() 312 bs->value[bs->nbuttons] = BSDDIALOG_GENERIC2; in get_buttons() 337 bs->sizebutton = MAX(bs->sizebutton, strcols(bs->label[i])); in get_buttons() [all …]
|
| H A D | barbox.c | 121 if (bs != NULL) in bar_checksize() 494 retval = bs.value[bs.curr]; in bsddialog_rangebox() 505 bs.curr = (bs.curr + 1) % bs.nbuttons; in bsddialog_rangebox() 510 bs.curr--; in bsddialog_rangebox() 515 if (bs.curr < (int) bs.nbuttons - 1) { in bsddialog_rangebox() 516 bs.curr++; in bsddialog_rangebox() 594 retval = bs.value[bs.curr]; in bsddialog_rangebox() 672 retval = bs.value[bs.curr]; in bsddialog_pause() 682 bs.curr = (bs.curr + 1) % bs.nbuttons; in bsddialog_pause() 692 if (bs.curr < (int) bs.nbuttons - 1) { in bsddialog_pause() [all …]
|
| H A D | calendarbox.c | 294 struct buttons bs; in bsddialog_calendar() local 354 retval = bs.value[bs.curr]; in bsddialog_calendar() 366 bs.curr++; in bsddialog_calendar() 367 if (bs.curr >= (int)bs.nbuttons) { in bsddialog_calendar() 378 bs.curr = 0; in bsddialog_calendar() 386 bs.curr++; in bsddialog_calendar() 387 if (bs.curr >= (int)bs.nbuttons) { in bsddialog_calendar() 403 bs.curr--; in bsddialog_calendar() 417 bs.curr = 0; in bsddialog_calendar() 475 bs) != 0) in bsddialog_calendar() [all …]
|
| /freebsd-14.2/sys/dev/xen/balloon/ |
| H A D | balloon.c | 77 #define bs balloon_stats macro 110 unsigned long target = min(bs.target_pages, bs.hard_limit); in current_target() 111 if (target > (bs.current_pages + bs.balloon_low + bs.balloon_high)) in current_target() 112 target = bs.current_pages + bs.balloon_low + bs.balloon_high; in current_target() 186 bs.hard_limit = (bs.current_pages + rc - in increase_reservation() 187 bs.driver_pages); in increase_reservation() 195 bs.balloon_low--; in increase_reservation() 242 bs.balloon_low++; in decrease_reservation() 378 bs.target_pages = bs.current_pages; in xenballoon_attach() 379 bs.balloon_low = 0; in xenballoon_attach() [all …]
|
| /freebsd-14.2/sys/dev/ath/ath_hal/ar5212/ |
| H A D | ar5212_beacon.c | 151 HALASSERT(bs->bs_intval != 0); in ar5212SetStaBeaconTimers() 153 if (bs->bs_cfpmaxduration != 0) { in ar5212SetStaBeaconTimers() 187 | SM(bs->bs_timoffset ? bs->bs_timoffset + 4 : 0, AR_BEACON_TIM) in ar5212SetStaBeaconTimers() 233 bs->bs_sleepduration); in ar5212SetStaBeaconTimers() 236 dtimperiod = bs->bs_dtimperiod; in ar5212SetStaBeaconTimers() 240 bs->bs_sleepduration); in ar5212SetStaBeaconTimers() 241 dtimperiod = bs->bs_sleepduration; in ar5212SetStaBeaconTimers() 245 nextTbtt = bs->bs_nextdtim; in ar5212SetStaBeaconTimers() 247 nextTbtt = bs->bs_nexttbtt; in ar5212SetStaBeaconTimers() 248 nextdtim = bs->bs_nextdtim; in ar5212SetStaBeaconTimers() [all …]
|
| /freebsd-14.2/sys/contrib/dev/ath/ath_hal/ar9300/ |
| H A D | ar9300_beacon.c | 88 HALASSERT(bs->bs_intval != 0); in ar9300_set_sta_beacon_timers() 107 HALASSERT(bs->bs_bmissthreshold <= in ar9300_set_sta_beacon_timers() 137 if (bs->bs_sleepduration > beaconintval) { in ar9300_set_sta_beacon_timers() 139 bs->bs_sleepduration); in ar9300_set_sta_beacon_timers() 140 beaconintval = bs->bs_sleepduration; in ar9300_set_sta_beacon_timers() 142 dtimperiod = bs->bs_dtimperiod; in ar9300_set_sta_beacon_timers() 143 if (bs->bs_sleepduration > dtimperiod) { in ar9300_set_sta_beacon_timers() 146 bs->bs_sleepduration); in ar9300_set_sta_beacon_timers() 147 dtimperiod = bs->bs_sleepduration; in ar9300_set_sta_beacon_timers() 151 next_tbtt = bs->bs_nextdtim; in ar9300_set_sta_beacon_timers() [all …]
|
| /freebsd-14.2/crypto/openssl/ssl/ |
| H A D | bio_ssl.c | 58 BIO_SSL *bs = OPENSSL_zalloc(sizeof(*bs)); in ssl_new() local 60 if (bs == NULL) { in ssl_new() 74 BIO_SSL *bs; in ssl_free() local 80 if (bs->ssl != NULL && !SSL_in_init(bs->ssl)) in ssl_free() 166 BIO_SSL *bs; in ssl_write() local 171 ssl = bs->ssl; in ssl_write() 181 if (bs->byte_count > bs->renegotiate_count) { in ssl_write() 192 if (tm > bs->last_time + bs->renegotiate_timeout) { in ssl_write() 233 ssl = bs->ssl; in ssl_ctrl() 396 BIO_SSL *bs; in ssl_callback_ctrl() local [all …]
|
| /freebsd-14.2/sys/dev/ath/ath_hal/ar5416/ |
| H A D | ar5416_beacon.c | 155 HALASSERT(bs->bs_intval != 0); in ar5416SetStaBeaconTimers() 176 HALASSERT(bs->bs_bmissthreshold <= in ar5416SetStaBeaconTimers() 233 bs->bs_sleepduration); in ar5416SetStaBeaconTimers() 234 beaconintval = bs->bs_sleepduration; in ar5416SetStaBeaconTimers() 236 dtimperiod = bs->bs_dtimperiod; in ar5416SetStaBeaconTimers() 240 bs->bs_sleepduration); in ar5416SetStaBeaconTimers() 241 dtimperiod = bs->bs_sleepduration; in ar5416SetStaBeaconTimers() 245 nextTbtt = bs->bs_nextdtim; in ar5416SetStaBeaconTimers() 247 nextTbtt = bs->bs_nexttbtt; in ar5416SetStaBeaconTimers() 248 nextdtim = bs->bs_nextdtim; in ar5416SetStaBeaconTimers() [all …]
|
| /freebsd-14.2/crypto/openssl/crypto/ocsp/ |
| H A D | ocsp_cl.c | 143 return bs->signature; in OCSP_resp_get0_signature() 148 return &bs->signatureAlgorithm; in OCSP_resp_get0_tbs_sigalg() 153 return &bs->tbsResponseData; in OCSP_resp_get0_respdata() 158 int OCSP_resp_count(OCSP_BASICRESP *bs) in OCSP_resp_count() argument 160 if (bs == NULL) in OCSP_resp_count() 168 if (bs == NULL) in OCSP_resp_get0() 175 return bs->tbsResponseData.producedAt; in OCSP_resp_get0_produced_at() 180 return bs->certs; in STACK_OF() 228 if (bs == NULL) in OCSP_resp_find() 289 int i = OCSP_resp_find(bs, id, -1); in OCSP_resp_find_status() [all …]
|
| /freebsd-14.2/tests/sys/geom/class/eli/ |
| H A D | integrity_test.sh | 20 atf_check dd if=backing_file of=sector bs=512 count=1 \ 22 atf_check dd if=sector of=backing_file bs=512 count=1 seek=1 \ 26 dd if=/dev/${md}.eli of=/dev/null bs=${secsize} count=1 30 atf_check dd if=/dev/${md}.eli of=/dev/null bs=${secsize} count=2 \ 43 dd if=/dev/${md}.eli of=/dev/null bs=${secsize} count=$ns 82 atf_check dd if=/dev/${md} of=sector bs=512 count=1 status=none 84 atf_check dd if=sector of=/dev/${md} bs=512 count=1 status=none 89 dd if=/dev/${md}.eli of=/dev/null bs=${secsize} count=1 126 atf_check dd if=/dev/${md} of=sector bs=512 count=1 status=none 128 atf_check dd if=sector of=/dev/${md} bs=512 count=1 status=none [all …]
|
| H A D | setkey_test.sh | 18 atf_check dd if=/dev/random of=rnd bs=512 count=${sectors} status=none 19 hash1=`dd if=rnd bs=512 count=${sectors} status=none | md5` 21 atf_check dd if=/dev/random of=keyfile1 bs=512 count=16 status=none 22 atf_check dd if=/dev/random of=keyfile2 bs=512 count=16 status=none 23 atf_check dd if=/dev/random of=keyfile3 bs=512 count=16 status=none 24 atf_check dd if=/dev/random of=keyfile4 bs=512 count=16 status=none 25 atf_check dd if=/dev/random of=keyfile5 bs=512 count=16 status=none 31 dd if=rnd of=/dev/${md}.eli bs=512 count=${sectors} status=none 109 hash1=`dd if=rnd bs=512 count=${sectors} status=none | md5` 111 atf_check dd if=/dev/random of=pass1 bs=512 count=32 status=none [all …]
|
| /freebsd-14.2/sys/contrib/openzfs/tests/zfs-tests/tests/functional/redacted_send/ |
| H A D | redacted.kshlib | 58 typeset bs=$(get_prop recsize $sendfs) 59 log_must dd if=/dev/urandom of=$mntpnt/f1 bs=$bs count=16 60 log_must dd if=/dev/urandom of=$mntpnt/f2 bs=$bs count=32 73 log_must dd if=/dev/urandom of=$mntpnt/$recsize bs=8 \ 92 log_must dd if=/dev/urandom of=$mntpnt/f1 bs=8M count=1 94 log_must dd if=/dev/urandom of=$mntpnt/f2 bs=1M count=1 98 log_must dd if=/dev/urandom of=$mntpnt/f3 bs=1M count=6 seek=1 120 typeset bs=$(get_prop recsize $sendfs) 121 log_must dd if=/dev/urandom of=$mntpnt/f1 bs=$bs count=16 122 log_must dd if=/dev/urandom of=$mntpnt/f2 bs=$bs count=32 [all …]
|
| /freebsd-14.2/sys/dev/ath/ath_hal/ar5210/ |
| H A D | ar5210_beacon.c | 122 HALASSERT(bs->bs_intval != 0); in ar5210SetStaBeaconTimers() 124 if (bs->bs_cfpmaxduration != 0) { in ar5210SetStaBeaconTimers() 131 OS_REG_WRITE(ah, AR_CFP_PERIOD, bs->bs_cfpperiod); in ar5210SetStaBeaconTimers() 137 OS_REG_WRITE(ah, AR_TIMER2, bs->bs_cfpnext << 3); in ar5210SetStaBeaconTimers() 147 OS_REG_WRITE(ah, AR_TIMER0, bs->bs_nexttbtt); in ar5210SetStaBeaconTimers() 158 | SM(bs->bs_intval, AR_BEACON_PERIOD) in ar5210SetStaBeaconTimers() 159 | SM(bs->bs_timoffset ? bs->bs_timoffset + 4 : 0, AR_BEACON_TIM) in ar5210SetStaBeaconTimers() 179 (bs->bs_bmissthreshold&7) == 0) { in ar5210SetStaBeaconTimers() 182 __func__, bs->bs_bmissthreshold); in ar5210SetStaBeaconTimers() 197 | SM(bs->bs_bmissthreshold > BMISS_MAX ? in ar5210SetStaBeaconTimers() [all …]
|
| /freebsd-14.2/sys/dev/ath/ath_hal/ar5211/ |
| H A D | ar5211_beacon.c | 122 ar5211SetStaBeaconTimers(struct ath_hal *ah, const HAL_BEACON_STATE *bs) in ar5211SetStaBeaconTimers() argument 128 HALASSERT(bs->bs_intval != 0); in ar5211SetStaBeaconTimers() 130 if (bs->bs_cfpmaxduration != 0) { in ar5211SetStaBeaconTimers() 136 OS_REG_WRITE(ah, AR_CFP_PERIOD, bs->bs_cfpperiod); in ar5211SetStaBeaconTimers() 139 OS_REG_WRITE(ah, AR_CFP_DUR, bs->bs_cfpmaxduration); in ar5211SetStaBeaconTimers() 142 OS_REG_WRITE(ah, AR_TIMER2, bs->bs_cfpnext << 3); in ar5211SetStaBeaconTimers() 152 OS_REG_WRITE(ah, AR_TIMER0, bs->bs_nexttbtt); in ar5211SetStaBeaconTimers() 163 | SM(bs->bs_intval, AR_BEACON_PERIOD) in ar5211SetStaBeaconTimers() 164 | SM(bs->bs_timoffset ? bs->bs_timoffset + 4 : 0, AR_BEACON_TIM) in ar5211SetStaBeaconTimers() 174 | SM(bs->bs_bmissthreshold, AR_RSSI_THR_BM_THR); in ar5211SetStaBeaconTimers() [all …]
|
| /freebsd-14.2/crypto/openssl/test/ |
| H A D | ocspapitest.c | 91 if (!TEST_ptr(bs) in make_dummy_resp() 99 bs_out = bs; in make_dummy_resp() 100 bs = NULL; in make_dummy_resp() 107 OCSP_BASICRESP_free(bs); in make_dummy_resp() 114 OCSP_BASICRESP *bs = NULL; in test_resp_signer() local 124 bs = make_dummy_resp(); in test_resp_signer() 126 if (!TEST_ptr(bs) in test_resp_signer() 136 OCSP_BASICRESP_free(bs); in test_resp_signer() 139 bs = make_dummy_resp(); in test_resp_signer() 141 if (!TEST_ptr(bs) in test_resp_signer() [all …]
|
| /freebsd-14.2/sys/dev/usb/controller/ |
| H A D | musb_otg_allwinner.c | 79 #define bs_parent_space(bs) ((bs)->bs_parent) argument 82 #define bs_parent_space(bs) (bs) argument 124 struct bus_space bs; member 245 struct bus_space *bs = t; in awusbdrd_bs_r_1() local 273 struct bus_space *bs = t; in awusbdrd_bs_r_2() local 284 struct bus_space *bs = t; in awusbdrd_bs_w_1() local 296 struct bus_space *bs = t; in awusbdrd_bs_w_2() local 308 struct bus_space *bs = t; in awusbdrd_bs_rm_1() local 317 struct bus_space *bs = t; in awusbdrd_bs_rm_4() local 326 struct bus_space *bs = t; in awusbdrd_bs_wm_1() local [all …]
|