/illumos-gate/usr/src/uts/sun4v/promif/ |
H A D | promif_io.c | 153 int rlen; in promif_do_read() local 167 for (rlen = 0; rlen < len; ) { in promif_do_read() 169 buf[rlen] = PROMIF_PIO_CALL1(getchar, arg); in promif_do_read() 170 rlen++; in promif_do_read() 180 return (rlen); in promif_do_read() 186 int rlen; in promif_do_write() local 197 for (rlen = 0; rlen < len; rlen++) in promif_do_write() 198 PROMIF_PIO_CALL2(putchar, arg, buf[rlen]); in promif_do_write() 202 return (rlen); in promif_do_write() 221 size_t rlen; in promif_write() local [all …]
|
/illumos-gate/usr/src/common/smbsrv/ |
H A D | smb_utf8.c | 338 int rlen; in smb_oemtombs() local 385 rlen = (max_mblen - olen); in smb_oemtombs() 388 rlen = oemlen; in smb_oemtombs() 389 if (rlen > max_mblen) in smb_oemtombs() 390 rlen = max_mblen; in smb_oemtombs() 391 bcopy(oems, mbs, rlen); in smb_oemtombs() 393 if (rlen < max_mblen) in smb_oemtombs() 394 mbs[rlen] = '\0'; in smb_oemtombs() 396 return (rlen); in smb_oemtombs() 416 int rlen; in smb_mbstooem() local [all …]
|
H A D | smb_msgbuf.c | 386 int rlen; in msgbuf_get_oem_string() local 430 rlen = smb_oemtombs(mbs, oembuf, mbsmax); in msgbuf_get_oem_string() 431 if (rlen < 0) in msgbuf_get_oem_string() 433 if (rlen > mbsmax) in msgbuf_get_oem_string() 434 rlen = mbsmax; in msgbuf_get_oem_string() 435 mbs[rlen] = '\0'; in msgbuf_get_oem_string() 456 size_t rlen; in msgbuf_get_unicode_string() local 506 rlen = smb_wcstombs(mbs, wcsbuf, mbsmax); in msgbuf_get_unicode_string() 507 if (rlen == (size_t)-1) in msgbuf_get_unicode_string() 509 if (rlen > mbsmax) in msgbuf_get_unicode_string() [all …]
|
/illumos-gate/usr/src/cmd/ldmad/ |
H A D | ldma_system.c | 82 size_t rlen; in ldma_sys_get_sysinfo() local 105 rlen = syslen + nodlen + rellen + verlen + maclen; in ldma_sys_get_sysinfo() 107 reply = ldma_alloc_result_msg(request, rlen); in ldma_sys_get_sysinfo() 114 reply->msg_info = rlen; in ldma_sys_get_sysinfo() 132 LDMA_DBG("GET_SYSINFO: return info=%u, {%s, %s, %s, %s, %s}", rlen, in ldma_sys_get_sysinfo() 137 *reply_dlenp = rlen; in ldma_sys_get_sysinfo() 258 size_t rlen; in ldma_sys_get_chassisno() local 276 rlen = strlen(str) + 1; in ldma_sys_get_chassisno() 278 reply = ldma_alloc_result_msg(request, rlen); in ldma_sys_get_chassisno() 285 reply->msg_info = rlen; in ldma_sys_get_chassisno() [all …]
|
/illumos-gate/usr/src/cmd/cmd-inet/usr.lib/in.ripngd/ |
H A D | tables.c | 209 int rlen; in rtcmd() local 222 rlen = write(rtsock, rt_msg, RIPNG_RTM_MSGLEN); in rtcmd() 223 if (rlen >= 0 && rlen < RIPNG_RTM_MSGLEN) { in rtcmd() 226 rlen); in rtcmd() 228 return (rlen); in rtcmd() 239 int rlen; in rtadd() local 297 rlen = rtcmd(RTM_ADD, &rt->rt_dst, &rt->rt_router, in rtadd() 299 if (rlen < 0) { in rtadd() 309 } else if (rlen < RIPNG_RTM_MSGLEN) { in rtadd() 331 int rlen; in rtchange() local [all …]
|
/illumos-gate/usr/src/lib/gss_mechs/mech_krb5/krb5/krb/ |
H A D | bld_princ.c | 38 krb5_build_principal_va(krb5_context context, krb5_principal princ, unsigned int rlen, const char *… in krb5_build_principal_va() argument 52 krb5_princ_set_realm_length(context, princ, rlen); in krb5_build_principal_va() 53 tmpdata = malloc(rlen + 1); in krb5_build_principal_va() 59 memcpy(tmpdata, realm, rlen); in krb5_build_principal_va() 60 tmpdata[rlen] = '\0'; in krb5_build_principal_va() 98 unsigned int rlen, in krb5_build_principal() argument 109 retval = krb5_build_principal_va(context, pr_ret, rlen, realm, ap); in krb5_build_principal()
|
H A D | bld_pr_ext.c | 37 unsigned int rlen, const char * realm, ...) in krb5_build_principal_ext() argument 68 tmpdata = malloc(rlen+1); in krb5_build_principal_ext() 74 krb5_princ_set_realm_length(context, princ_ret, rlen); in krb5_build_principal_ext() 76 memcpy(tmpdata, realm, rlen); in krb5_build_principal_ext() 77 tmpdata[rlen] = 0; in krb5_build_principal_ext()
|
/illumos-gate/usr/src/cmd/smbsrv/nvlprint/ |
H A D | nvlprint.c | 33 int rlen; in dumpit() local 46 rlen = fread(buf, 1, flen, fp); in dumpit() 47 if (rlen <= 0) { in dumpit() 51 if (rlen != flen) { in dumpit() 52 (void) printf("Short read %d %d \n", rlen, flen); in dumpit()
|
/illumos-gate/usr/src/cmd/cmd-inet/usr.bin/pppdump/ |
H A D | deflate.c | 234 int rlen, olen, ospace; local 261 rlen = state->strm.avail_in + PPP_HDRLEN + DEFLATE_OVHD; 289 state->stats.comp_bytes += rlen; 306 int rlen, proto, r; local 322 rlen = mi + mlen - rptr; 324 state->strm.avail_in = rlen; 340 ++rlen; 341 rlen += 2; 342 state->stats.inc_bytes += rlen; 344 state->stats.unc_bytes += rlen;
|
/illumos-gate/usr/src/uts/common/fs/smbsrv/ |
H A D | smb_authenticate.c | 124 uint32_t rlen = 0; in smb_auth_do_oldreq() local 162 rlen = msg_hdr.lmh_msglen; in smb_auth_do_oldreq() 176 if (rlen == sizeof (smb_lsa_eresp_t)) { in smb_auth_do_oldreq() 190 kmem_free(rbuf, rlen); in smb_auth_do_oldreq() 232 uint32_t rlen = 0; in smb_authenticate_ext() local 328 rlen = msg_hdr.lmh_msglen; in smb_authenticate_ext() 337 sinfo->ssi_oseclen = (uint16_t)rlen; in smb_authenticate_ext() 348 sinfo->ssi_oseclen = (uint16_t)rlen; in smb_authenticate_ext() 363 if (rlen == sizeof (smb_lsa_eresp_t)) { in smb_authenticate_ext() 381 kmem_free(rbuf, rlen); in smb_authenticate_ext() [all …]
|
H A D | smb_mbuf_marshaling.c | 1099 int rlen; in mbc_marshal_put_oem_string() local 1122 rlen = smb_mbstooem(oembuf, mbs, oemlen); in mbc_marshal_put_oem_string() 1123 if (rlen < 0) { in mbc_marshal_put_oem_string() 1127 if (rlen > oemlen) in mbc_marshal_put_oem_string() 1128 rlen = oemlen; in mbc_marshal_put_oem_string() 1129 oembuf[rlen] = '\0'; in mbc_marshal_put_oem_string() 1168 size_t rlen; in mbc_marshal_put_unicode_string() local 1200 rlen = smb_mbstowcs(wcsbuf, mbs, wcslen); in mbc_marshal_put_unicode_string() 1201 if (rlen == (size_t)-1) { in mbc_marshal_put_unicode_string() 1205 if (rlen > wcslen) in mbc_marshal_put_unicode_string() [all …]
|
/illumos-gate/usr/src/cmd/sendmail/src/ |
H A D | milter.c | 133 strlen(response) + 1 != (size_t) rlen || \ 134 rlen < 3 || \ 382 milter_read(m, cmd, rlen, to, e, where) in milter_read() argument 385 ssize_t *rlen; 409 *rlen = 0; 486 *rlen = expl; 1992 ssize_t rlen; local 2107 response = milter_read(m, &rcmd, &rlen, 2305 milter_getsymlist(m, buf, rlen, offset) in milter_getsymlist() argument 2308 int rlen; [all …]
|
/illumos-gate/usr/src/cmd/cmd-inet/usr.lib/bridged/ |
H A D | door.c | 94 size_t rlen; in bridge_door_server() local 100 rlen = sizeof (twoints); in bridge_door_server() 102 rlen = sizeof (int) + nextport * sizeof (datalink_id_t); in bridge_door_server() 103 rbuf = alloca(rlen); in bridge_door_server() 110 rlen = sizeof (int) + nports * sizeof (datalink_id_t); in bridge_door_server() 113 (void) door_return((char *)rbuf, rlen, NULL, 0); in bridge_door_server()
|
/illumos-gate/usr/src/boot/i386/libi386/ |
H A D | biospnp.c | 190 u_int tag, i, rlen, dlen; in biospnp_scanresdata() local 197 for (i = 0; i < dlen; i+= rlen) { in biospnp_scanresdata() 201 rlen = PNP_SRES_LEN(tag); in biospnp_scanresdata() 215 rlen = *(u_int16_t *)(p + i); in biospnp_scanresdata() 221 str = malloc(rlen + 1); in biospnp_scanresdata() 222 bcopy(p + i, str, rlen); in biospnp_scanresdata() 223 str[rlen] = 0; in biospnp_scanresdata()
|
/illumos-gate/usr/src/uts/common/io/ |
H A D | ksyms.c | 166 ksyms_asmap(struct as *as, size_t rlen) in ksyms_asmap() argument 171 map_addr(&addr, rlen, 0, 1, 0); in ksyms_asmap() 172 if (addr == NULL || as_map(as, addr, rlen, segvn_create, zfod_argsp)) { in ksyms_asmap() 183 size_t sz, rlen = roundup(size, PAGESIZE); in ksyms_mapin() local 188 if ((addr = ksyms_asmap(as, rlen)) == NULL) in ksyms_mapin() 196 (void) as_unmap(as, addr, rlen); in ksyms_mapin() 340 size_t rlen = 0; in ksyms_segmap() local 351 rlen = roundup(len, PAGESIZE); in ksyms_segmap() 352 if ((addr = ksyms_asmap(as, rlen)) == NULL) in ksyms_segmap() 369 (void) as_unmap(as, addr, rlen); in ksyms_segmap()
|
H A D | busra.c | 947 int rlen, rcount, i; in pci_resource_setup() local 1032 "available", (caddr_t)®s, &rlen) == DDI_SUCCESS) { in pci_resource_setup() 1044 rcount = rlen / sizeof (pci_regspec_t); in pci_resource_setup() 1083 kmem_free(regs, rlen); in pci_resource_setup() 1333 int rlen, rcount; in pci_get_available_prop() local 1349 "available", (caddr_t)®s, &rlen); in pci_get_available_prop() 1360 newregs = kmem_alloc(rlen + sizeof (pci_regspec_t), KM_SLEEP); in pci_get_available_prop() 1362 rcount = rlen / sizeof (pci_regspec_t); in pci_get_available_prop() 1446 kmem_free(newregs, rlen + sizeof (pci_regspec_t)); in pci_get_available_prop() 1447 kmem_free(regs, rlen); in pci_get_available_prop() [all …]
|
/illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/snoop/ |
H A D | snoop_ldap.c | 853 static int rlen = 0; /* tlv's real length */ in decpdu() local 893 rlen = olen[ctxnum]; in decpdu() 896 for (rlen = 0, olen[ctxnum] &= 0x0F; in decpdu() 900 rlen = (rlen << 8) | INT(hex); in decpdu() 902 if (!rlen) { in decpdu() 1212 if (rlen > pdulen) { in decpdu() 1215 rlen = pdulen; in decpdu() 1223 stlv = decpdu((rlen?rlen:pdulen), \ in decpdu() 1233 for (j = 0; (rlen) && (pdulen > 0); \ in decpdu() 1234 --rlen, --pdulen, ++effnb) { in decpdu() [all …]
|
/illumos-gate/usr/src/lib/libproc/common/ |
H A D | proc_stdio.c | 108 int rlen, alen; in copy_fd() local 113 rlen = (len > sizeof (buffer)) ? sizeof (buffer) : len; in copy_fd() 114 alen = read(fileno(in), buffer, rlen); in copy_fd() 115 if (alen == rlen) { in copy_fd()
|
/illumos-gate/usr/src/uts/sparc/os/ |
H A D | bootdev.c | 222 size_t olen, rlen; in i_devname_to_promname() local 265 rlen = len; in i_devname_to_promname() 275 (void) snprintf(rptr, rlen, "%s", prom_path); in i_devname_to_promname() 356 (void) snprintf(rptr, rlen, "%s", prom_path); in i_devname_to_promname() 357 rlen -= strlen(rptr) + 1; in i_devname_to_promname() 359 if (rlen <= 0) /* drop paths we can't store */ in i_devname_to_promname() 375 if (rlen > 0) { in i_devname_to_promname() 377 bcopy(offline, rptr, rlen); in i_devname_to_promname()
|
/illumos-gate/usr/src/psm/promif/ieee1275/common/ |
H A D | prom_io.c | 147 ssize_t rlen; in prom_write() local 162 rlen = promif_redirect(promif_redirect_arg, (uchar_t *)buf, in prom_write() 165 return (rlen); in prom_write() 227 rlen = p1275_cell2size(ci[6]); /* Res1: actual len */ in prom_write() 237 return (rlen); in prom_write()
|
/illumos-gate/usr/src/cmd/cmd-inet/usr.lib/wpad/ |
H A D | wpa.c | 803 int rlen; in wpa_supplicant_key_request() local 823 rlen = sizeof (*ethhdr) + sizeof (*hdr) + sizeof (*reply); in wpa_supplicant_key_request() 824 rbuf = malloc(rlen); in wpa_supplicant_key_request() 828 (void) memset(rbuf, 0, rlen); in wpa_supplicant_key_request() 859 rlen - sizeof (*ethhdr), reply->key_mic); in wpa_supplicant_key_request() 864 error, pairwise, wpa_s->ptk_set, rlen); in wpa_supplicant_key_request() 865 wpa_hexdump(MSG_MSGDUMP, "WPA: TX EAPOL-Key Request", rbuf, rlen); in wpa_supplicant_key_request() 866 (void) l2_packet_send(wpa_s->l2, rbuf, rlen); in wpa_supplicant_key_request() 874 int rlen; in wpa_supplicant_process_1_of_4() local 934 rlen = sizeof (*ethhdr) + sizeof (*hdr) + sizeof (*reply) + wpa_ie_len; in wpa_supplicant_process_1_of_4() [all …]
|
/illumos-gate/usr/src/lib/libpkg/common/ |
H A D | pkgserv.c | 486 pkgcmd(PKGserver srv, void *cmd, size_t len, char **result, size_t *rlen, in pkgcmd() argument 496 da.rsize = rlen == NULL ? 0 : *rlen; in pkgcmd() 528 *rlen = da.data_size; in pkgcmd() 740 unsigned int rlen; in pkggetentry_named() local 747 rlen = server->buflen; in pkggetentry_named() 750 &result, &rlen, NULL) != 0) { in pkggetentry_named() 753 if (rlen == 0) in pkggetentry_named() 759 server->buflen = rlen; in pkggetentry_named() 763 (void) memcpy(server->curbuf, result, rlen); in pkggetentry_named() 764 (void) munmap(result, rlen); in pkggetentry_named() [all …]
|
/illumos-gate/usr/src/lib/libc/port/gen/ |
H A D | nss_dbdefs.c | 391 const char *dbname, int dbop __unused, size_t *rlen, const char *typestr) in nss_pack_key2str() argument 404 dbname == NULL || rlen == NULL || typestr == NULL) in nss_pack_key2str() 416 *rlen = len; in nss_pack_key2str() 423 *rlen = len; in nss_pack_key2str() 430 *rlen = len; in nss_pack_key2str() 437 *rlen = len; in nss_pack_key2str() 455 *rlen = len2; in nss_pack_key2str() 472 *rlen = len2; in nss_pack_key2str() 479 *rlen = len; in nss_pack_key2str() 499 *rlen = len3; in nss_pack_key2str() [all …]
|
/illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/ |
H A D | 6to4relay.c | 106 int rlen; in modifyroute() local 147 rlen = write(rtsock, &rt_msg, rt_msg.rt_hdr.rtm_msglen); in modifyroute() 148 if (rlen < rt_msg.rt_hdr.rtm_msglen) { in modifyroute() 149 if (rlen < 0) { in modifyroute() 155 "routing socket got only %d for rlen\n"), rlen); in modifyroute()
|
/illumos-gate/usr/src/uts/sun4v/io/ |
H A D | dr_mem.c | 755 int rlen; in dr_mem_list_query() local 770 rlen = sizeof (dr_mem_hdr_t); in dr_mem_list_query() 783 rlen += nml * sizeof (dr_mem_query_t); in dr_mem_list_query() 785 rlen += req->msg_arg * sizeof (dr_mem_query_t); in dr_mem_list_query() 787 rp = kmem_zalloc(rlen, KM_SLEEP); in dr_mem_list_query() 810 *resp_len = rlen; in dr_mem_list_query() 946 int rlen; in dr_mem_del_stat() local 956 rlen = sizeof (dr_mem_hdr_t); in dr_mem_del_stat() 957 rlen += status * sizeof (memdelstat_t); in dr_mem_del_stat() 958 rp = kmem_zalloc(rlen, KM_SLEEP); in dr_mem_del_stat() [all …]
|