/illumos-gate/usr/src/uts/common/io/usb/usba/ |
H A D | parser.c | 37 #define INCREMENT_BUF(buf) \ argument 38 if ((buf)[0] == 0) { \ 41 (buf) += (buf)[0]; \ 185 usb_nth_descr(const uchar_t *buf, size_t buflen, int descr_type, uint_t n, in usb_nth_descr() argument 188 const uchar_t *bufstart = buf; in usb_nth_descr() 189 const uchar_t *bufend = buf + buflen; in usb_nth_descr() 191 if (buf == NULL) { in usb_nth_descr() 196 while (buf + 2 <= bufend) { in usb_nth_descr() 197 if ((buf != bufstart) && ((buf[1] == stop_descr_type1) || in usb_nth_descr() 198 (buf[1] == stop_descr_type2))) { in usb_nth_descr() [all …]
|
/illumos-gate/usr/src/lib/libc/port/threads/ |
H A D | assfail.c | 163 char buf[800]; in lock_error() local 193 (void) strcpy(buf, in lock_error() 195 (void) strcat(buf, who); in lock_error() 196 (void) strcat(buf, "("); in lock_error() 198 ultos((uint64_t)(uintptr_t)cv, 16, buf + strlen(buf)); in lock_error() 199 (void) strcat(buf, ", "); in lock_error() 201 ultos((uint64_t)(uintptr_t)mp, 16, buf + strlen(buf)); in lock_error() 202 (void) strcat(buf, ")"); in lock_error() 204 (void) strcat(buf, ": "); in lock_error() 205 (void) strcat(buf, msg); in lock_error() [all …]
|
/illumos-gate/usr/src/lib/gss_mechs/mech_krb5/krb5/asn.1/ |
H A D | asn1buf.c | 66 asn1_error_code asn1buf_create(asn1buf **buf) in asn1buf_create() argument 68 *buf = (asn1buf*)malloc(sizeof(asn1buf)); in asn1buf_create() 69 if (*buf == NULL) return ENOMEM; in asn1buf_create() 70 (*buf)->base = NULL; in asn1buf_create() 71 (*buf)->bound = NULL; in asn1buf_create() 72 (*buf)->next = NULL; in asn1buf_create() 76 asn1_error_code asn1buf_wrap_data(asn1buf *buf, const krb5_data *code) in asn1buf_wrap_data() argument 79 buf->next = buf->base = code->data; in asn1buf_wrap_data() 80 buf->bound = code->data + code->length - 1; in asn1buf_wrap_data() 84 asn1_error_code asn1buf_imbed(asn1buf *subbuf, const asn1buf *buf, const unsigned int length, const… in asn1buf_imbed() argument [all …]
|
H A D | asn1_k_decode.h | 71 (asn1buf *buf, int *val); 73 (asn1buf *buf, krb5_int32 *val); 75 (asn1buf *buf, krb5_kvno *val); 77 (asn1buf *buf, krb5_enctype *val); 79 (asn1buf *buf, krb5_msgtype *val); 81 (asn1buf *buf, krb5_cksumtype *val); 83 (asn1buf *buf, krb5_octet *val); 85 (asn1buf *buf, krb5_addrtype *val); 87 (asn1buf *buf, krb5_authdatatype *val); 89 (asn1buf *buf, krb5_ui_2 *val); [all …]
|
H A D | asn1buf.h | 16 (const asn1buf *buf); 20 #define asn1buf_size(buf) \ argument 21 (((buf) == NULL || (buf)->base == NULL) \ 23 : ((buf)->bound - (buf)->base + 1)) 26 (const asn1buf *buf); 29 #define asn1buf_free(buf) \ argument 30 (((buf) == NULL || (buf)->base == NULL) \ 32 : ((buf)->bound - (buf)->next + 1)) 36 (asn1buf *buf, const unsigned int amount); 42 #define asn1buf_ensure_space(buf,amount) \ argument [all …]
|
/illumos-gate/usr/src/lib/libc/port/locale/ |
H A D | strptime.c | 54 __strptime(const char *_RESTRICT_KYWD buf, const char *_RESTRICT_KYWD fmt, in __strptime() argument 70 if (*buf == 0) in __strptime() 77 while (isspace(*buf)) in __strptime() 78 buf++; in __strptime() 79 else if (c != *buf++) in __strptime() 91 if (*buf++ != '%') in __strptime() 96 buf = __strptime(buf, tptr->date_fmt, tm, flagsp, loc); in __strptime() 97 if (buf == NULL) in __strptime() 102 if (!isdigit(*buf)) in __strptime() 107 for (i = 0; len && isdigit(*buf); buf++) { in __strptime() [all …]
|
/illumos-gate/usr/src/test/libc-tests/tests/ |
H A D | printf-6961.c | 41 char buf[32]; in main() local 72 (void) memset(buf, 'r', sizeof (buf)); in main() 73 (void) snprintf(buf + 4, sizeof (buf) - 4, "%lo", ~0L); in main() 74 if (bcmp(octal0, buf, sizeof (buf)) != 0) { in main() 75 print_diff("~0 in Octal", octal0, buf); in main() 79 (void) memset(buf, 'r', sizeof (buf)); in main() 80 (void) snprintf(buf + 4, sizeof (buf) - 4, "%lo", 42L); in main() 81 if (bcmp(octal1, buf, sizeof (buf)) != 0) { in main() 82 print_diff("42 in Octal", octal1, buf); in main() 86 (void) memset(buf, 'r', sizeof (buf)); in main() [all …]
|
/illumos-gate/usr/src/cmd/cmd-inet/usr.bin/nc/ |
H A D | socks.c | 105 proxy_read_line(int fd, char *buf, size_t bufsz) in proxy_read_line() argument 112 if (atomicio(read, fd, buf + off, 1) != 1) in proxy_read_line() 115 if (buf[off] == '\r') in proxy_read_line() 117 if (buf[off] == '\n') { in proxy_read_line() 118 buf[off] = '\0'; in proxy_read_line() 155 char buf[1024]; in socks_connect() local 187 buf[0] = SOCKS_V5; in socks_connect() 188 buf[1] = 1; in socks_connect() 189 buf[2] = SOCKS_NOAUTH; in socks_connect() 190 cnt = atomicio(vwrite, proxyfd, buf, 3); in socks_connect() [all …]
|
/illumos-gate/usr/src/lib/libsff/common/ |
H A D | libsff.c | 684 sff_parse_compliance(const uint8_t *buf, nvlist_t *nvl) in sff_parse_compliance() argument 689 if ((ret = sff_gather_bitfield(buf[SFF_8472_COMPLIANCE_10GE] & in sff_parse_compliance() 694 if ((ret = sff_gather_bitfield(buf[SFF_8472_COMPLIANCE_IB] & in sff_parse_compliance() 699 if ((ret = sff_gather_bitfield(buf[SFF_8472_COMPLIANCE_ESCON] & in sff_parse_compliance() 704 v = buf[SFF_8472_COMPLIANCE_SONET_LOW] | in sff_parse_compliance() 705 (buf[SFF_8472_COMPLIANCE_SONET_HIGH] << 8); in sff_parse_compliance() 710 if ((ret = sff_gather_bitfield(buf[SFF_8472_COMPLIANCE_ETHERNET] & in sff_parse_compliance() 715 if ((ret = sff_gather_bitfield(buf[SFF_8472_COMPLIANCE_FCLEN] & in sff_parse_compliance() 720 v = buf[SFF_8472_COMPLIANCE_FC_LOW] | in sff_parse_compliance() 721 (buf[SFF_8472_COMPLIANCE_FC_HIGH] << 8); in sff_parse_compliance() [all …]
|
/illumos-gate/usr/src/lib/iconv_modules/zh/common/ |
H A D | uni_common.c | 27 static int unichr_to_ucs_2le (st, unichr, buf, buflen, uconv_num) in unichr_to_ucs_2le() argument 30 char *buf; 45 *(buf + size++) = (uchar_t)0xff; 46 *(buf + size++) = (uchar_t)0xfe; 53 *(buf + size++) = (uchar_t)(unichr & 0xff); 54 *(buf + size++) = (uchar_t)((unichr >> 8) & 0xff); 60 static int unichr_to_ucs_2be (st, unichr, buf, buflen, uconv_num) in unichr_to_ucs_2be() argument 63 char *buf; 78 *(buf + size++) = (uchar_t)0xfe; 79 *(buf + size++) = (uchar_t)0xff; [all …]
|
/illumos-gate/usr/src/cmd/msgfmt/ |
H A D | gnu_lex.c | 136 (void) memcpy(backbuf, pch->buf, backlen); in po_ungetc() 148 (void) memcpy(och.buf, backbuf, backlen); in po_getc() 175 och.buf[0] = '\\'; in po_getc() 184 och.buf[0] = '\n'; in po_getc() 191 och.buf[0] = (unsigned char)c; in po_getc() 195 och.len = get_mb(&och.buf[0], (unsigned char)c); in po_getc() 203 extend_buf(char **buf, size_t *size, size_t add) in extend_buf() argument 208 tmp = (char *)Xrealloc(*buf, *size); in extend_buf() 209 *buf = tmp; in extend_buf() 232 switch (pch->buf[0]) { in expand_es() [all …]
|
/illumos-gate/usr/src/lib/pkcs11/pkcs11_softtoken/common/ |
H A D | softKeystore.c | 357 uchar_t *buf, *buf1; in soft_keystore_pack_obj() local 389 buf = calloc(1, ks_len); in soft_keystore_pack_obj() 390 if (buf == NULL) { in soft_keystore_pack_obj() 393 (void) memcpy(buf, &hdr, sizeof (ks_obj_hdr_t)); in soft_keystore_pack_obj() 394 buf1 = buf + sizeof (ks_obj_hdr_t); in soft_keystore_pack_obj() 414 *ks_buf = buf; in soft_keystore_pack_obj() 449 uchar_t *buf; in soft_keystore_unpack_obj() local 458 hdr = (ks_obj_hdr_t *)ks_obj->buf; in soft_keystore_unpack_obj() 474 buf = ks_obj->buf + sizeof (ks_obj_hdr_t); in soft_keystore_unpack_obj() 481 attr_hdr = (ks_attr_hdr_t *)buf; in soft_keystore_unpack_obj() [all …]
|
/illumos-gate/usr/src/uts/common/sys/ |
H A D | buf.h | 82 typedef struct buf { struct 84 struct buf *b_forw; /* headed by d_tab of conf.c */ argument 85 struct buf *b_back; /* " */ argument 86 struct buf *av_forw; /* position on free list, */ argument 87 struct buf *av_back; /* if not BUSY */ argument 118 int (*b_iodone)(struct buf *); /* function called by iodone */ argument 120 struct buf *b_chain; /* chain together all buffers here */ argument 127 struct buf *b_list; /* List of potential B_DELWRI bufs */ argument 141 struct buf *b_forw, *b_back; /* queue of unit queues */ argument 142 struct buf *av_forw, *av_back; /* queue of bufs for this unit */ [all …]
|
/illumos-gate/usr/src/test/util-tests/tests/libsff/ |
H A D | libsff_wave.c | 39 uint8_t buf[256]; in main() local 47 bzero(buf, sizeof (buf)); in main() 48 buf[SFF_8472_WAVELENGTH_HI] = 0x12; in main() 49 buf[SFF_8472_WAVELENGTH_LOW] = 0x34; in main() 51 if ((ret = libsff_parse(buf, sizeof (buf), 0xa0, &nvl)) != 0) { in main() 67 bzero(buf, sizeof (buf)); in main() 68 buf[SFF_8472_COMPLIANCE_SFP] = 0x08; in main() 69 buf[SFF_8472_WAVELENGTH_HI] = 0x12; in main() 70 buf[SFF_8472_WAVELENGTH_LOW] = 0x34; in main() 72 if ((ret = libsff_parse(buf, sizeof (buf), 0xa0, &nvl)) != 0) { in main() [all …]
|
/illumos-gate/usr/src/lib/libresolv2/common/nameser/ |
H A D | ns_print.c | 47 char **buf, size_t *buflen); 50 char **buf, size_t *buflen); 51 static void addlen(size_t len, char **buf, size_t *buflen); 53 char **buf, size_t *buflen); 55 char **buf, size_t *buflen); 79 char *buf, size_t buflen) in ns_sprintrr() argument 86 name_ctx, origin, buf, buflen); in ns_sprintrr() 101 char *buf, size_t buflen) in ns_sprintrrf() argument 103 const char *obuf = buf; in ns_sprintrrf() 115 T(addstr("\t\t\t", 3, &buf, &buflen)); in ns_sprintrrf() [all …]
|
/illumos-gate/usr/src/lib/print/libprint/common/ |
H A D | nss_convert.c | 73 _cvt_printer_to_entry(ns_printer_t *printer, char *buf, int buflen) in _cvt_printer_to_entry() argument 78 (void) memset(buf, 0, buflen); in _cvt_printer_to_entry() 83 if (snprintf(buf, buflen, "%s", printer->name) >= buflen) { in _cvt_printer_to_entry() 84 (void) memset(buf, 0, buflen); in _cvt_printer_to_entry() 93 (void) strlcat(buf, "|", buflen); in _cvt_printer_to_entry() 94 (void) strncat_escaped(buf, *alias++, buflen, in _cvt_printer_to_entry() 99 if (strlcat(buf, ":", buflen) >= buflen) { in _cvt_printer_to_entry() 100 (void) memset(buf, 0, buflen); in _cvt_printer_to_entry() 105 len = strlen(buf); in _cvt_printer_to_entry() 112 (void) strlcat(buf, "\\\n\t:", buflen); in _cvt_printer_to_entry() [all …]
|
/illumos-gate/usr/src/contrib/ast/src/lib/libast/port/ |
H A D | astlicense.c | 104 #define BUF(b) ((b)->buf) 105 #define USE(b) ((b)->siz=(b)->nxt-(b)->buf,(b)->nxt=(b)->buf,(b)->siz) 106 #define SIZ(b) ((b)->nxt-(b)->buf) 107 #define END(b) (*((b)->nxt>=(b)->end?((b)->nxt=(b)->end-1):(b)->nxt)=0,(b)->nxt-(b)->buf) 115 char* buf; member 431 push(Stack_t* sp, char* file, char* parent, char* info, int size, Buffer_t* buf) in push() argument 441 copy(buf, file, -1); in push() 442 copy(buf, ": no space", -1); in push() 443 PUT(buf, 0); in push() 470 copy(buf, file, -1); in push() [all …]
|
/illumos-gate/usr/src/uts/common/io/scsi/adapters/pmcs/ |
H A D | pmcs_fwlog.c | 59 caddr_t buf = NULL; in pmcs_register_dump_int() local 75 buf = pwp->regdumpp; in pmcs_register_dump_int() 78 n = pmcs_dump_spc_ver(pwp, buf, size_left); in pmcs_register_dump_int() 80 buf += n; size_left -= n; in pmcs_register_dump_int() 81 n = pmcs_dump_gsm_conf(pwp, buf, size_left); in pmcs_register_dump_int() 83 buf += n; size_left -= n; in pmcs_register_dump_int() 84 n = pmcs_dump_pcie_conf(pwp, buf, size_left); in pmcs_register_dump_int() 86 buf += n; size_left -= n; in pmcs_register_dump_int() 87 n = pmcs_dump_mpi_table(pwp, buf, size_left); in pmcs_register_dump_int() 89 buf += n; size_left -= n; in pmcs_register_dump_int() [all …]
|
/illumos-gate/usr/src/uts/common/gssapi/mechs/krb5/mech/ |
H A D | util_token.c | 94 static void der_write_length(buf, length) in der_write_length() argument 95 unsigned char **buf; in der_write_length() 99 *(*buf)++ = (unsigned char) length; 101 *(*buf)++ = (unsigned char) (der_length_size(length)+127); 104 *(*buf)++ = (unsigned char) (length>>24); 106 *(*buf)++ = (unsigned char) ((length>>16)&0xff); 109 *(*buf)++ = (unsigned char) ((length>>8)&0xff); 110 *(*buf)++ = (unsigned char) (length&0xff); 117 static int der_read_length(buf, bufsize) in der_read_length() argument 118 unsigned char **buf; in der_read_length() [all …]
|
/illumos-gate/usr/src/ucblib/libucb/port/gen/ |
H A D | statfs.c | 25 cnvtvfs64(struct statfs64 *buf, struct statvfs64 *vbuf) in cnvtvfs64() argument 27 buf->f_type = 0; in cnvtvfs64() 28 buf->f_bsize = vbuf->f_frsize; in cnvtvfs64() 29 buf->f_blocks = vbuf->f_blocks; in cnvtvfs64() 30 buf->f_bfree = vbuf->f_bfree; in cnvtvfs64() 31 buf->f_bavail = vbuf->f_bavail; in cnvtvfs64() 32 buf->f_files = vbuf->f_files; in cnvtvfs64() 33 buf->f_ffree = vbuf->f_ffree; in cnvtvfs64() 34 buf->f_fsid.val[0] = vbuf->f_fsid; in cnvtvfs64() 35 buf->f_fsid.val[1] = 0; in cnvtvfs64() [all …]
|
/illumos-gate/usr/src/uts/common/io/bnxe/ |
H A D | bnxe_debug.c | 74 char buf[BNXE_LOG_LEN]; in elink_cb_dbg() local 82 snprintf(buf, sizeof(buf), fmt); in elink_cb_dbg() 83 cmn_err(CE_NOTE, "!%s: ELINK %s", BnxeDevName(pUM), buf); in elink_cb_dbg() 91 char buf[BNXE_LOG_LEN]; in elink_cb_dbg1() local 99 snprintf(buf, sizeof(buf), fmt, arg1); in elink_cb_dbg1() 100 cmn_err(CE_NOTE, "!%s: ELINK %s", BnxeDevName(pUM), buf); in elink_cb_dbg1() 108 char buf[BNXE_LOG_LEN]; in elink_cb_dbg2() local 116 snprintf(buf, sizeof(buf), fmt, arg1, arg2); in elink_cb_dbg2() 117 cmn_err(CE_NOTE, "!%s: ELINK %s", BnxeDevName(pUM), buf); in elink_cb_dbg2() 125 char buf[BNXE_LOG_LEN]; in elink_cb_dbg3() local [all …]
|
/illumos-gate/usr/src/lib/pkcs11/pkcs11_tpm/common/ |
H A D | asn1.c | 302 CK_BYTE *buf = NULL; in ber_encode_INTEGER() local 330 buf = (CK_BYTE *)malloc(len); in ber_encode_INTEGER() 331 if (! buf) { in ber_encode_INTEGER() 335 buf[0] = 0x02; in ber_encode_INTEGER() 336 buf[1] = data_len; in ber_encode_INTEGER() 337 (void) memcpy(&buf[2], data, data_len); in ber_encode_INTEGER() 340 *ber_int = buf; in ber_encode_INTEGER() 345 buf[0] = 0x02; in ber_encode_INTEGER() 346 buf[1] = 0x81; in ber_encode_INTEGER() 347 buf[2] = data_len; in ber_encode_INTEGER() [all …]
|
/illumos-gate/usr/src/uts/common/c2/ |
H A D | audit_mem.c | 80 au_free_rec(au_buff_t *buf) in au_free_rec() argument 93 softcall(audit_async_discard_backend, buf); in au_free_rec() 96 while (buf != NULL) { in au_free_rec() 97 next = buf->next_buf; in au_free_rec() 98 kmem_cache_free(au_buf_cache, buf); in au_free_rec() 99 buf = next; in au_free_rec() 123 au_append_rec(au_buff_t *rec, au_buff_t *buf, int pack) in au_append_rec() argument 130 if (((int)(rec->len + buf->len) <= AU_BUFSIZE) && pack) { in au_append_rec() 131 bcopy(buf->buf, (char *)(rec->buf + rec->len), in au_append_rec() 132 (uint_t)buf->len); in au_append_rec() [all …]
|
/illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/snoop/ |
H A D | snoop_socks.c | 34 static void put_socks5_addr(char *cp, const unsigned char *buf, int fraglen); 44 unsigned char *buf = (unsigned char *)line; local 52 switch (buf[0]) { 54 n = buf[1]; 59 (void) memcpy(&ipaddr, &buf[4], 65 (buf[2] << 8) | buf[3]); 73 if (buf[i] == '\0') 75 *cp++ = buf[i]; 91 n = buf[1]; 97 put_method(cp, buf[2 + i]); [all …]
|
/illumos-gate/usr/src/cmd/lp/lib/msgs/ |
H A D | _getmessage.c | 40 int _getmessage ( char * buf, short rtype, va_list arg ) in _getmessage() argument 42 int _getmessage (buf, rtype, arg) in _getmessage() 43 char *buf; in _getmessage() 56 if (buf == (char *)0) 67 endbuf = buf + (long)stoh(buf); 68 if ((buf + MESG_DATA) > endbuf) 74 etype = stoh(buf + MESG_TYPE); 94 buf += MESG_LEN; 100 if ((buf + 4) > endbuf) 107 *t_short = stoh(buf); [all …]
|