/freebsd/share/examples/ses/srcs/ |
H A D | eltsub.c | 48 static char rbuf[132]; in geteltnm() local 52 sprintf(rbuf, "Unspecified"); in geteltnm() 55 sprintf(rbuf, "Device Slot"); in geteltnm() 58 sprintf(rbuf, "Power Supply"); in geteltnm() 61 sprintf(rbuf, "Cooling"); in geteltnm() 64 sprintf(rbuf, "Temperature Sensor"); in geteltnm() 67 sprintf(rbuf, "Door Lock"); in geteltnm() 70 sprintf(rbuf, "Audible alarm"); in geteltnm() 73 sprintf(rbuf, "Enclosure Services Controller Electronics"); in geteltnm() 76 sprintf(rbuf, "SCC Controller Electronics"); in geteltnm() [all …]
|
/freebsd/bin/ed/ |
H A D | sub.c | 106 static char *rbuf; /* substitute_matching_text buffer */ variable 132 txt = rbuf; in search_and_replace() 133 eot = rbuf + len; in search_and_replace() 186 REALLOC(rbuf, rbufsz, off + i, ERR); in substitute_matching_text() 189 memcpy(rbuf + off, txt, i); in substitute_matching_text() 196 REALLOC(rbuf, rbufsz, off + i, ERR); in substitute_matching_text() 199 memcpy(rbuf + off, txt, i); in substitute_matching_text() 207 REALLOC(rbuf, rbufsz, off + i + 2, ERR); in substitute_matching_text() 214 memcpy(rbuf + off, txt, i); in substitute_matching_text() 215 memcpy(rbuf + off + i, "\n", 2); in substitute_matching_text() [all …]
|
/freebsd/usr.sbin/sesutil/ |
H A D | eltsub.c | 54 static char rbuf[132]; in geteltnm() local 110 snprintf(rbuf, sizeof(rbuf), "<Type 0x%x>", type); in geteltnm() 111 return (rbuf); in geteltnm() 118 static char rbuf[32]; in scode2ascii() local 139 snprintf(rbuf, sizeof(rbuf), "<Status 0x%x>", code & 0xf); in scode2ascii() 140 return (rbuf); in scode2ascii()
|
/freebsd/contrib/ntp/ntpd/ |
H A D | ntpsim.c | 228 struct recvbuf *rbuf; in sim_event_timer() local 239 rbuf = (struct recvbuf *)dequeue(recv_queue); in sim_event_timer() 240 (*rbuf->receiver)(rbuf); in sim_event_timer() 241 free_node(rbuf); in sim_event_timer() 265 struct recvbuf rbuf; /* Buffer for the received packet */ in simulate_server() local 275 ZERO(rbuf); in simulate_server() 345 rbuf.used = 1; in simulate_server() 346 rbuf.receiver = &receive; /* callback to process the packet */ in simulate_server() 347 rbuf.recv_length = LEN_PKT_NOMAC; in simulate_server() 348 rbuf.recv_pkt = xpkt; in simulate_server() [all …]
|
/freebsd/sys/dev/hptnr/ |
H A D | hptnr_osm_bsd.c | 772 HPT_U8 *rbuf; in hpt_scsi_io() local 778 rbuf = (HPT_U8 *)inquiryData; in hpt_scsi_io() 781 rbuf[0] = 0; in hpt_scsi_io() 782 rbuf[1] = 0; in hpt_scsi_io() 783 rbuf[2] = 0; in hpt_scsi_io() 784 rbuf[3] = 3; in hpt_scsi_io() 785 rbuf[4] = 0; in hpt_scsi_io() 786 rbuf[5] = 0x80; in hpt_scsi_io() 787 rbuf[6] = 0x83; in hpt_scsi_io() 791 rbuf[0] = 0; in hpt_scsi_io() [all …]
|
/freebsd/crypto/heimdal/kadmin/ |
H A D | random_password.c | 121 unsigned char rbuf[8]; /* random buffer */ in generate_password() local 145 int x = RND(rbuf, sizeof(rbuf), &rleft) % (len - i); in generate_password() 149 (*pw)[i] = classes[j].str[RND(rbuf, sizeof(rbuf), &rleft) in generate_password() 158 memset(rbuf, 0, sizeof(rbuf)); in generate_password()
|
/freebsd/tests/sys/netinet/ |
H A D | udp_io.c | 67 char sbuf[] = "Hello, peer!", rbuf[sizeof(sbuf)]; in ATF_TC_BODY() local 83 iov.iov_base = rbuf; in ATF_TC_BODY() 87 ATF_REQUIRE(strncmp(sbuf, rbuf, n) == 0); in ATF_TC_BODY() 88 iov.iov_len = sizeof(rbuf); in ATF_TC_BODY() 102 char sbuf[] = "Hello, peer!", rbuf[sizeof(sbuf)]; in ATF_TC_BODY() local 117 iov.iov_base = rbuf; in ATF_TC_BODY() 126 ATF_REQUIRE(strncmp(sbuf, rbuf, n) == 0); in ATF_TC_BODY()
|
/freebsd/tests/sys/kern/ |
H A D | tty_pts.c | 21 char rbuf[32]; in ATF_TC_BODY() local 37 ATF_REQUIRE_EQ(sizeof(buf) - 1, read(master, rbuf, sizeof(rbuf))); in ATF_TC_BODY() 57 ATF_REQUIRE_EQ(0, read(master, rbuf, sizeof(rbuf))); in ATF_TC_BODY()
|
/freebsd/contrib/ntp/sntp/libevent/test/ |
H A D | regress_iocp.c | 211 static struct evbuffer *rbuf = NULL, *wbuf = NULL; variable 218 evbuffer_commit_read_(rbuf, nbytes); in read_complete() 253 rbuf = evbuffer_overlapped_new_(data->pair[0]); in test_iocp_evbuffer() 255 evbuffer_enable_locking(rbuf, NULL); in test_iocp_evbuffer() 260 tt_assert(rbuf); in test_iocp_evbuffer() 271 evbuffer_add(rbuf, junk, sizeof(junk)); in test_iocp_evbuffer() 272 tt_assert(!evbuffer_launch_read_(rbuf, 2048, &rol)); in test_iocp_evbuffer() 273 evbuffer_add_buffer(buf, rbuf); in test_iocp_evbuffer() 277 tt_assert(!evbuffer_get_length(rbuf)); in test_iocp_evbuffer() 282 tt_int_op(evbuffer_get_length(rbuf),==,512); in test_iocp_evbuffer() [all …]
|
/freebsd/contrib/libevent/test/ |
H A D | regress_iocp.c | 211 static struct evbuffer *rbuf = NULL, *wbuf = NULL; variable 218 evbuffer_commit_read_(rbuf, nbytes); in read_complete() 253 rbuf = evbuffer_overlapped_new_(data->pair[0]); in test_iocp_evbuffer() 255 evbuffer_enable_locking(rbuf, NULL); in test_iocp_evbuffer() 260 tt_assert(rbuf); in test_iocp_evbuffer() 271 evbuffer_add(rbuf, junk, sizeof(junk)); in test_iocp_evbuffer() 272 tt_assert(!evbuffer_launch_read_(rbuf, 2048, &rol)); in test_iocp_evbuffer() 273 evbuffer_add_buffer(buf, rbuf); in test_iocp_evbuffer() 277 tt_assert(!evbuffer_get_length(rbuf)); in test_iocp_evbuffer() 282 tt_int_op(evbuffer_get_length(rbuf),==,512); in test_iocp_evbuffer() [all …]
|
/freebsd/tests/sys/cddl/zfs/bin/ |
H A D | file_trunc.c | 172 char *rbuf = NULL; in do_write() local 175 rbuf = (char *)calloc(1, bsize); in do_write() 176 if (buf == NULL || rbuf == NULL) { in do_write() 199 if (read(fd, rbuf, bsize) < bsize) { in do_write() 204 if (memcmp(buf, rbuf, bsize) != 0) { in do_write() 219 (void) free(rbuf); in do_write()
|
/freebsd/usr.bin/mail/ |
H A D | quit.c | 66 FILE *ibuf, *obuf, *fbuf, *rbuf, *readstat, *abuf; in quit() local 101 rbuf = NULL; in quit() 107 (rbuf = Fdopen(fd, "w")) == NULL) in quit() 112 (void)putc(c, rbuf); in quit() 119 (void)putc(c, rbuf); in quit() 122 (void)Fclose(rbuf); in quit() 123 if ((rbuf = Fopen(tempname, "r")) == NULL) in quit() 179 writeback(rbuf); in quit() 289 writeback(rbuf); in quit() 300 if (rbuf != NULL) { in quit() [all …]
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/cmd/file/ |
H A D | file_trunc.c | 174 char *rbuf = NULL; in do_write() local 177 rbuf = (char *)calloc(1, bsize); in do_write() 178 if (buf == NULL || rbuf == NULL) { in do_write() 201 if (read(fd, rbuf, bsize) < bsize) { in do_write() 206 if (memcmp(buf, rbuf, bsize) != 0) { in do_write() 222 (void) free(rbuf); in do_write()
|
/freebsd/crypto/openssl/crypto/err/ |
H A D | err_blocks.c | 64 char *rbuf = NULL; in ERR_vset_error() local 84 && (rbuf = OPENSSL_realloc(buf, ERR_MAX_DATA_SIZE)) != NULL) { in ERR_vset_error() 85 buf = rbuf; in ERR_vset_error() 103 if ((rbuf = OPENSSL_realloc(buf, printed_len + 1)) != NULL) { in ERR_vset_error() 104 buf = rbuf; in ERR_vset_error()
|
/freebsd/sys/dev/smbus/ |
H A D | smb.c | 64 uint32_t rbuf; member 184 PTRIN_CP(*uaddr, *kaddr, rbuf); in smbcopyincmd32() 299 /* NB: for SMB_OLD_READB the read data goes to rbuf only. */ in smbioctl() 304 if (s->rbuf && s->rcount >= 1) { in smbioctl() 305 error = copyout(&s->rdata.byte, s->rbuf, 1); in smbioctl() 316 /* NB: for SMB_OLD_READW the read data goes to rbuf only. */ in smbioctl() 321 if (s->rbuf && s->rcount >= 2) { in smbioctl() 324 error = copyout(buf, s->rbuf, 2); in smbioctl() 335 /* NB: for SMB_OLD_PCALL the read data goes to rbuf only. */ in smbioctl() 340 if (s->rbuf in smbioctl() [all...] |
/freebsd/contrib/bearssl/src/ssl/ |
H A D | ssl_rec_cbc.c | 313 unsigned char *buf, *rbuf; in cbc_encrypt() local 346 rbuf = buf - blen - 5; in cbc_encrypt() 364 rbuf = buf - 4 in cbc_encrypt() 366 rbuf[0] = buf[0]; in cbc_encrypt() 368 rbuf = cbc_encrypt(cc, record_type, in cbc_encrypt() 369 version, rbuf, &xlen); in cbc_encrypt() 373 rbuf = buf - 5; in cbc_encrypt() 420 *data_len = (size_t)((buf + len) - rbuf); in cbc_encrypt() 421 return rbuf; in cbc_encrypt()
|
/freebsd/crypto/openssl/ssl/record/ |
H A D | rec_layer_d1.c | 73 OPENSSL_free(rdata->rbuf.buf); in DTLS_RECORD_LAYER_clear() 81 OPENSSL_cleanse(rdata->rbuf.buf, rdata->rbuf.len); in DTLS_RECORD_LAYER_clear() 82 OPENSSL_free(rdata->rbuf.buf); in DTLS_RECORD_LAYER_clear() 90 OPENSSL_cleanse(rdata->rbuf.buf, rdata->rbuf.len); in DTLS_RECORD_LAYER_clear() 91 OPENSSL_free(rdata->rbuf.buf); in DTLS_RECORD_LAYER_clear() 133 SSL3_BUFFER_release(&s->rlayer.rbuf); in dtls1_copy_record() 137 memcpy(&s->rlayer.rbuf, &(rdata->rbuf), sizeof(SSL3_BUFFER)); in dtls1_copy_record() 166 memcpy(&(rdata->rbuf), &s->rlayer.rbuf, sizeof(SSL3_BUFFER)); in dtls1_buffer_record() 183 memset(&s->rlayer.rbuf, 0, sizeof(s->rlayer.rbuf)); in dtls1_buffer_record() 188 OPENSSL_free(rdata->rbuf.buf); in dtls1_buffer_record() [all …]
|
/freebsd/sbin/setkey/ |
H A D | setkey.c | 267 u_char rbuf[1024 * 32]; /* XXX: Enough ? Should I do MSG_PEEK ? */ in promisc() local 287 if ((l = recv(so, rbuf, sizeof(*base), MSG_PEEK)) < 0) { in promisc() 295 base = (struct sadb_msg *)rbuf; in promisc() 296 if ((l = recv(so, rbuf, PFKEY_UNUNIT64(base->sadb_msg_len), in promisc() 307 printf("%02x ", rbuf[i] & 0xff); in promisc() 332 u_char rbuf[1024 * 32]; /* XXX: Enough ? Should I do MSG_PEEK ? */ in sendkeymsg() local 371 msg = (struct sadb_msg *)rbuf; in sendkeymsg() 373 if ((l = recv(so, rbuf, sizeof(rbuf), 0)) < 0) { in sendkeymsg() 384 kdebug_sadb((struct sadb_msg *)rbuf); in sendkeymsg() [all...] |
/freebsd/tests/sys/netgraph/ |
H A D | ksocket.c | 41 char sbuf[] = "Hello, peer!", rbuf[sizeof(sbuf)]; in hellocheck() local 44 ATF_REQUIRE(recv(rd, rbuf, sizeof(rbuf), 0) == sizeof(sbuf)); in hellocheck() 45 ATF_REQUIRE(strcmp(sbuf, rbuf) == 0); in hellocheck()
|
/freebsd/sys/dev/hpt27xx/ |
H A D | hpt27xx_osm_bsd.c | 600 HPT_U8 *rbuf = ccb->csio.data_ptr; in hpt_scsi_io() local 629 rbuf[0] = (HPT_U8)(cap>>24); in hpt_scsi_io() 630 rbuf[1] = (HPT_U8)(cap>>16); in hpt_scsi_io() 631 rbuf[2] = (HPT_U8)(cap>>8); in hpt_scsi_io() 632 rbuf[3] = (HPT_U8)cap; in hpt_scsi_io() 633 rbuf[4] = 0; in hpt_scsi_io() 634 rbuf[5] = 0; in hpt_scsi_io() 635 rbuf[6] = 2 << sector_size_shift; in hpt_scsi_io() 636 rbuf[7] = 0; in hpt_scsi_io() 643 HPT_U8 *rbuf = ccb->csio.data_ptr; in hpt_scsi_io() local [all …]
|
/freebsd/sbin/routed/ |
H A D | main.c | 581 static int rbuf; in fix_sock() local 597 if (rbuf >= MIN_SOCKBUF) { in fix_sock() 599 &rbuf, sizeof(rbuf)) < 0) in fix_sock() 601 name, rbuf, strerror(errno)); in fix_sock() 603 for (rbuf = 60*1024; ; rbuf -= 4096) { in fix_sock() 605 &rbuf, sizeof(rbuf)) == 0) { in fix_sock() 606 trace_act("RCVBUF=%d", rbuf); in fix_sock() 609 if (rbuf < MIN_SOCKBUF) { in fix_sock() 611 name, rbuf, strerror(errno)); in fix_sock()
|
/freebsd/sys/dev/bhnd/nvram/ |
H A D | bhnd_nvram_data_btxt.c | 798 const void *rbuf; in bhnd_nvram_btxt_entry_len() local 803 if ((error = bhnd_nvram_io_read_ptr(io, offset, &rbuf, 0, &nbytes))) in bhnd_nvram_btxt_entry_len() 807 p = rbuf; in bhnd_nvram_btxt_entry_len() 808 baseptr = rbuf; in bhnd_nvram_btxt_entry_len() 837 const void *rbuf; in bhnd_nvram_btxt_seek_eol() local 842 if ((error = bhnd_nvram_io_read_ptr(io, *offset, &rbuf, 0, &nbytes))) in bhnd_nvram_btxt_seek_eol() 845 baseptr = rbuf; in bhnd_nvram_btxt_seek_eol() 846 p = rbuf; in bhnd_nvram_btxt_seek_eol() 877 const void *rbuf; in bhnd_nvram_btxt_seek_next() local 882 if ((error = bhnd_nvram_io_read_ptr(io, *offset, &rbuf, 0, &nbytes))) in bhnd_nvram_btxt_seek_next() [all …]
|
/freebsd/contrib/blocklist/bin/ |
H A D | blacklistd.c | 172 char rbuf[BUFSIZ]; in process() local 192 sockaddr_snprintf(rbuf, sizeof(rbuf), "%a:%p", (void *)&rss); in process() 194 " uid=%lu gid=%lu", bi->bi_type, bi->bi_fd, rbuf, in process() 211 "last=%s now=%s", __func__, rbuf, dbi.count, c.c_nfail, in process() 244 sockaddr_snprintf(rbuf, sizeof(rbuf), "%a", in process() 248 rbuf, c.c_lmask, c.c_port, c.c_duration); in process() 271 "last=%s now=%s", __func__, rbuf, dbi.count, c.c_nfail, in process()
|
/freebsd/sys/dev/hptrr/ |
H A D | hptrr_osm_bsd.c | 606 HPT_U8 *rbuf = ccb->csio.data_ptr; in hpt_scsi_io() local 614 rbuf[0] = (HPT_U8)(cap>>24); in hpt_scsi_io() 615 rbuf[1] = (HPT_U8)(cap>>16); in hpt_scsi_io() 616 rbuf[2] = (HPT_U8)(cap>>8); in hpt_scsi_io() 617 rbuf[3] = (HPT_U8)cap; in hpt_scsi_io() 618 rbuf[4] = 0; in hpt_scsi_io() 619 rbuf[5] = 0; in hpt_scsi_io() 620 rbuf[6] = 2; in hpt_scsi_io() 621 rbuf[7] = 0; in hpt_scsi_io() 629 HPT_U8 *rbuf = ccb->csio.data_ptr; in hpt_scsi_io() local [all …]
|
/freebsd/usr.bin/netstat/ |
H A D | netgraph.c | 86 u_char rbuf[sizeof(struct ng_mesg) + sizeof(struct nodeinfo)]; in netgraphprotopr() local 87 struct ng_mesg *resp = (struct ng_mesg *) rbuf; in netgraphprotopr() 130 if (NgRecvMsg(csock, resp, sizeof(rbuf), NULL) < 0) in netgraphprotopr()
|