/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 115 T(addstr("\t\t\t", 3, &buf, &buflen)); in ns_sprintrrf() 121 T(addstr("@\t\t\t", 4, &buf, &buflen)); in ns_sprintrrf() [all …]
|
/illumos-gate/usr/src/cmd/nvmeadm/ |
H A D | nvmeadm_ofmt.c | 34 char *buf, size_t buflen) in nvmeadm_bits_to_str() argument 42 if (comma && strlcat(buf, ",", buflen) >= buflen) in nvmeadm_bits_to_str() 44 if (strlcat(buf, strs[i].nb_str, buflen) >= buflen) in nvmeadm_bits_to_str() 50 if (strlcat(buf, "--", buflen) >= buflen) in nvmeadm_bits_to_str() 72 nvmeadm_list_common_ofmt_cb(ofmt_arg_t *ofmt_arg, char *buf, uint_t buflen) in nvmeadm_list_common_ofmt_cb() argument 81 ret = strlcpy(buf, nvme_ctrl_info_model(ctrl), buflen); in nvmeadm_list_common_ofmt_cb() 84 ret = strlcpy(buf, nvme_ctrl_info_serial(ctrl), buflen); in nvmeadm_list_common_ofmt_cb() 87 ret = strlcpy(buf, nvme_ctrl_info_fwrev(ctrl), buflen); in nvmeadm_list_common_ofmt_cb() 91 ret = snprintf(buf, buflen, "%u.%u", vers->v_major, in nvmeadm_list_common_ofmt_cb() 95 ret = strlcpy(buf, list->nloa_name, buflen); in nvmeadm_list_common_ofmt_cb() [all …]
|
/illumos-gate/usr/src/cmd/smbsrv/smbadm/ |
H A D | smbinfo.c | 363 fmt_user(ofmt_arg_t *arg, char *buf, uint_t buflen) in fmt_user() argument 370 (void) snprintf(buf, buflen, "%" PRIu64, ui->ui_session_id); in fmt_user() 373 print_str(ui->ui_domain, buf, buflen); in fmt_user() 376 print_str(ui->ui_account, buf, buflen); in fmt_user() 379 (void) snprintf(buf, buflen, "%s\\%s", ui->ui_domain, in fmt_user() 384 (void) snprintf(buf, buflen, "%u", ui->ui_posix_uid); in fmt_user() 387 print_str(ui->ui_workstation, buf, buflen); in fmt_user() 390 (void) smb_inet_ntop(&ui->ui_ipaddr, buf, buflen); in fmt_user() 394 (void) snprintf(buf, buflen, "%" PRId32, ui->ui_native_os); in fmt_user() 397 print_time(ui->ui_logon_time, TIME_FMT, buf, buflen); in fmt_user() [all …]
|
/illumos-gate/usr/src/cmd/pcieadm/ |
H A D | pcieadm_devs.c | 122 pcieadm_show_devs_ofmt_cb(ofmt_arg_t *ofarg, char *buf, uint_t buflen) in pcieadm_show_devs_ofmt_cb() argument 130 if (snprintf(buf, buflen, "%x/%x/%x", psdo->psdo_bus, in pcieadm_show_devs_ofmt_cb() 131 psdo->psdo_dev, psdo->psdo_func) >= buflen) { in pcieadm_show_devs_ofmt_cb() 136 if (snprintf(buf, buflen, "%x", psdo->psdo_bus) >= buflen) { in pcieadm_show_devs_ofmt_cb() 141 if (snprintf(buf, buflen, "%x", psdo->psdo_dev) >= buflen) { in pcieadm_show_devs_ofmt_cb() 146 if (snprintf(buf, buflen, "%x", psdo->psdo_func) >= buflen) { in pcieadm_show_devs_ofmt_cb() 152 (void) snprintf(buf, buflen, "--"); in pcieadm_show_devs_ofmt_cb() 153 } else if (snprintf(buf, buflen, "%s%d", psdo->psdo_driver, in pcieadm_show_devs_ofmt_cb() 154 psdo->psdo_instance) >= buflen) { in pcieadm_show_devs_ofmt_cb() 160 (void) snprintf(buf, buflen, "--"); in pcieadm_show_devs_ofmt_cb() [all …]
|
/illumos-gate/usr/src/lib/libdisasm/common/ |
H A D | dis_riscv.c | 328 char *buf, size_t buflen) in dis_riscv_rtype_32() argument 330 (void) dis_snprintf(buf, buflen, "%s %s,%s,%s", table->drv_name, in dis_riscv_rtype_32() 338 char *buf, size_t buflen) in dis_riscv_itype_32() argument 344 (void) dis_snprintf(buf, buflen, "%s %s,%s,%s0%o", in dis_riscv_itype_32() 348 (void) dis_snprintf(buf, buflen, "%s %s,%s,%s0x%x", in dis_riscv_itype_32() 356 char *buf, size_t buflen) in dis_riscv_btype_32() argument 364 (void) dis_snprintf(buf, buflen, "%s %s,%s,%s0%o", in dis_riscv_btype_32() 368 (void) dis_snprintf(buf, buflen, "%s %s,%s,%s0x%x", in dis_riscv_btype_32() 376 char *buf, size_t buflen) in dis_riscv_load() argument 382 (void) dis_snprintf(buf, buflen, "%s %s,%s0%o(%s)", in dis_riscv_load() [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 31 size_t buflen; 42 if (buflen < 4) 50 if (buflen < 2) 60 static int unichr_to_ucs_2be (st, unichr, buf, buflen, uconv_num) in unichr_to_ucs_2be() argument 64 size_t buflen; 75 if (buflen < 4) 83 if (buflen < 2) 93 static int unichr_to_ucs_4le (st, unichr, buf, buflen, uconv_num) in unichr_to_ucs_4le() argument 97 size_t buflen; [all …]
|
/illumos-gate/usr/src/lib/libzutil/common/ |
H A D | zutil_nicenum.c | 49 zfs_nicenum_format(uint64_t num, char *buf, size_t buflen, in zfs_nicenum_format() argument 72 (void) snprintf(buf, buflen, "%llu", (u_longlong_t)num); in zfs_nicenum_format() 75 (void) snprintf(buf, buflen, "%llu", (u_longlong_t)num); in zfs_nicenum_format() 78 (void) snprintf(buf, buflen, "%s", "-"); in zfs_nicenum_format() 91 (void) snprintf(buf, buflen, "-"); in zfs_nicenum_format() 98 (void) snprintf(buf, buflen, "%llu%s", (u_longlong_t)n, u); in zfs_nicenum_format() 124 if (snprintf(buf, buflen, "%d%s", in zfs_nicenum_format() 129 if (snprintf(buf, buflen, "%.*f%s", i, in zfs_nicenum_format() 141 zfs_nicenum(uint64_t num, char *buf, size_t buflen) in zfs_nicenum() argument 143 zfs_nicenum_format(num, buf, buflen, ZFS_NICENUM_1024); in zfs_nicenum() [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() 112 (void) strlcat(buf, "\\\n\t:", buflen); in _cvt_printer_to_entry() 113 (void) strncat_escaped(buf, kvp->key, buflen, ESCAPE_CHARS); in _cvt_printer_to_entry() [all …]
|
/illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/snoop/ |
H A D | snoop_nfs4.c | 92 static void sumarg_cb_getattr(char *buf, size_t buflen, void *obj); 94 static void sumarg_cb_recall(char *buf, size_t buflen, void *obj); 98 static void sumarg_access(char *buf, size_t buflen, void *obj); 100 static void sumarg_close(char *buf, size_t buflen, void *obj); 102 static void sumarg_commit(char *buf, size_t buflen, void *obj); 104 static void sumarg_compnt(char *buf, size_t buflen, void *obj); 106 static void sumarg_create(char *buf, size_t buflen, void *obj); 108 static void sumarg_delprge(char *buf, size_t buflen, void *obj); 110 static void sumarg_delret(char *buf, size_t buflen, void *obj); 112 static void sumarg_getattr(char *buf, size_t buflen, void *obj); [all …]
|
/illumos-gate/usr/src/uts/common/io/usb/usba/ |
H A D | parser.c | 185 usb_nth_descr(const uchar_t *buf, size_t buflen, int descr_type, uint_t n, in usb_nth_descr() argument 189 const uchar_t *bufend = buf + buflen; in usb_nth_descr() 223 usb_parse_dev_descr(const uchar_t *buf, size_t buflen, in usb_parse_dev_descr() argument 227 (buflen < 2) || (buf[1] != USB_DESCR_TYPE_DEV)) { in usb_parse_dev_descr() 233 buf, buflen, ret_descr, ret_buf_len)); in usb_parse_dev_descr() 238 usb_parse_cfg_descr(const uchar_t *buf, size_t buflen, in usb_parse_cfg_descr() argument 242 (buflen < 2) || (buf[1] != USB_DESCR_TYPE_CFG)) { in usb_parse_cfg_descr() 248 buf, buflen, ret_descr, ret_buf_len)); in usb_parse_cfg_descr() 253 usba_parse_cfg_pwr_descr(const uchar_t *buf, size_t buflen, in usba_parse_cfg_pwr_descr() argument 256 const uchar_t *bufend = buf + buflen; in usba_parse_cfg_pwr_descr() [all …]
|
/illumos-gate/usr/src/lib/nsswitch/ldap/common/ |
H A D | getprojent.c | 69 int buflen = 0, len; in _nss_ldap_proj2str() local 78 buflen = argp->buf.buflen; in _nss_ldap_proj2str() 82 if ((be->buffer = calloc(1, buflen)) == NULL) { in _nss_ldap_proj2str() 91 (void) memset(buffer, 0, buflen); in _nss_ldap_proj2str() 108 len = snprintf(buffer, buflen, "%s:%s:%s:", name[0], id[0], in _nss_ldap_proj2str() 110 TEST_AND_ADJUST(len, buffer, buflen, result_proj2str); in _nss_ldap_proj2str() 121 len = snprintf(buffer, buflen, "%s", in _nss_ldap_proj2str() 125 len = snprintf(buffer, buflen, ",%s", in _nss_ldap_proj2str() 128 TEST_AND_ADJUST(len, buffer, buflen, result_proj2str); in _nss_ldap_proj2str() 131 len = snprintf(buffer, buflen, ":"); in _nss_ldap_proj2str() [all …]
|
H A D | getprinter.c | 68 int buflen = 0, len; in _nss_ldap_printers2str() local 80 buflen = argp->buf.buflen; in _nss_ldap_printers2str() 82 be->buffer = calloc(1, buflen); in _nss_ldap_printers2str() 85 be->buflen = buflen; in _nss_ldap_printers2str() 89 (void) memset(argp->buf.buffer, 0, buflen); in _nss_ldap_printers2str() 107 len = snprintf(buffer, buflen, "%s", name[0]); in _nss_ldap_printers2str() 108 TEST_AND_ADJUST(len, buffer, buflen, result_printers2str); in _nss_ldap_printers2str() 114 len = snprintf(buffer, buflen, "|%s", in _nss_ldap_printers2str() 116 TEST_AND_ADJUST(len, buffer, buflen, in _nss_ldap_printers2str() 141 len = snprintf(buffer, buflen, ":%s", in _nss_ldap_printers2str() [all …]
|
H A D | getgrent.c | 93 int buflen = 0, len; in _nss_ldap_group2str() local 106 buflen = argp->buf.buflen; in _nss_ldap_group2str() 109 if ((be->buffer = calloc(1, buflen)) == NULL) { in _nss_ldap_group2str() 118 (void) memset(buffer, 0, buflen); in _nss_ldap_group2str() 150 len = snprintf(buffer, buflen, "%s:%s:%s:", gname[0], password, gid[0]); in _nss_ldap_group2str() 151 TEST_AND_ADJUST(len, buffer, buflen, result_grp2str); in _nss_ldap_group2str() 155 nss_result = getmembers_UID(&buffer, &buflen, members); in _nss_ldap_group2str() 162 nss_result = getmembers_DN(&buffer, &buflen, members); in _nss_ldap_group2str() 169 be->buflen = strlen(be->buffer); in _nss_ldap_group2str() 185 int buflen; in getmembers_UID() local [all …]
|
/illumos-gate/usr/src/lib/libcmdutils/common/ |
H A D | nicenum.c | 41 nicenum_scale(uint64_t n, size_t units, char *buf, size_t buflen, in nicenum_scale() argument 93 rc = snprintf(buf, buflen, "%llu%s", n, spc); in nicenum_scale() 99 rc = snprintf(buf, buflen, "%llu%s%c", n / divisor, spc, u); in nicenum_scale() 113 if ((rc = snprintf(buf, buflen, "%.*f%s%c", i, in nicenum_scale() 114 (double)n / divisor, spc, u)) <= (buflen - 1)) in nicenum_scale() 119 if (rc + 1 > buflen || rc < 0) in nicenum_scale() 126 if (buflen > 10) in nicenum_scale() 127 (void) strlcpy(buf, "<overflow>", buflen); in nicenum_scale() 129 (void) strlcpy(buf, "??", buflen); in nicenum_scale() 133 nicenum(uint64_t num, char *buf, size_t buflen) in nicenum() argument [all …]
|
/illumos-gate/usr/src/lib/libnsl/nss/ |
H A D | gethostbyname_r.c | 68 int buflen, int *h_errnop); 72 struct hostent *result, char *buffer, int buflen, int *h_errnop); 77 char *buffer, int buflen, int *h_errnop) in _uncached_gethostbyname_r() argument 80 buffer, buflen, h_errnop)); in _uncached_gethostbyname_r() 85 struct hostent *result, char *buffer, int buflen, int *h_errnop) in _uncached_gethostbyaddr_r() argument 88 result, buffer, buflen, h_errnop)); in _uncached_gethostbyaddr_r() 95 int buflen, int *h_errnop); 99 struct hostent *result, char *buffer, int buflen, int *h_errnop); 103 int buflen, int *h_errnop) in gethostbyname_r() argument 127 nssin.arg.nss.host.buflen = buflen; in gethostbyname_r() [all …]
|
/illumos-gate/usr/src/lib/nsswitch/ad/common/ |
H A D | getspent.c | 33 int buflen; in update_buffer() local 46 buflen = snprintf(NULL, 0, "%s@%s:*NP*:::::::", name, domain) + 1; in update_buffer() 49 buffer = be->buffer = malloc(buflen); in update_buffer() 52 be->buflen = buflen; in update_buffer() 54 if (buflen > argp->buf.buflen) in update_buffer() 56 buflen = argp->buf.buflen; in update_buffer() 60 buflen = snprintf(buffer, buflen, "%s@%s:*NP*:::::::", in update_buffer()
|
/illumos-gate/usr/src/lib/libresolv2/include/ |
H A D | port_before.h | 73 #define NET_R_ARGS char *buf, int buflen 75 #define NET_R_COPY buf, buflen 92 #define GROUP_R_ARGS char *buf, int buflen 97 #define HOST_R_ARGS char *buf, int buflen, int *h_errnop 99 #define HOST_R_COPY buf, buflen 100 #define HOST_R_COPY_ARGS char *buf, int buflen 112 #define NGR_R_ARGS char *buf, int buflen 114 #define NGR_R_COPY buf, buflen 132 #define PROTO_R_ARGS char *buf, int buflen 134 #define PROTO_R_COPY buf, buflen [all …]
|
/illumos-gate/usr/src/cmd/stmfproxy/stmfproxy/ |
H A D | stmfproxy.c | 130 uint32_t buflen; in postMsg() local 141 buf = malloc(nelem + sizeof (buflen)); in postMsg() 143 buflen = htonl(nelem); /* length in network byte order */ in postMsg() 144 bcopy(&buflen, buf, sizeof (buflen)); in postMsg() 145 bcopy(aluaMsg, buf + sizeof (buflen), nelem); in postMsg() 148 ns = pt_ops->stmf_proxy_send(t_handle, buf, nelem + sizeof (buflen)); in postMsg() 150 if (ns != nelem + sizeof (buflen)) { in postMsg() 169 uint32_t buflen; member 201 rc = stmfPostProxyMsg(proxy_hdl, (void *)pq->buf, pq->buflen); in push_to_drv() 220 uint32_t buflen; in relay_peer_msg() local [all …]
|
/illumos-gate/usr/src/lib/libresolv/ |
H A D | res_mkquery.c | 123 res_mkquery(op, dname, class, type, data, datalen, newrr, buf, buflen) in res_mkquery() argument 131 int buflen; /* size of buffer */ 162 if ((buf == NULL) || (buflen < sizeof (HEADER))) 176 buflen -= sizeof (HEADER); 186 if ((buflen -= QFIXEDSZ) < 0) 188 if ((n = dn_comp((u_char *)dname, cp, buflen, 192 buflen -= n; 203 buflen -= RRFIXEDSZ; 204 if ((n = dn_comp((u_char *)data, cp, buflen, 208 buflen -= n; [all …]
|
/illumos-gate/usr/src/lib/libdemangle/common/ |
H A D | rust-v0puny.c | 66 size_t buflen; in rustv0_puny_decode() local 88 buflen = 0; in rustv0_puny_decode() 146 buflen++; in rustv0_puny_decode() 160 VERIFY3U(i, <=, buflen); in rustv0_puny_decode() 167 VERIFY3U(buflen, <, bufalloc - 1); in rustv0_puny_decode() 195 buflen++; in rustv0_puny_decode() 197 bias = rustv0_puny_adapt(i - old_i, buflen, in rustv0_puny_decode() 199 n = n + i / buflen; in rustv0_puny_decode() 200 i = i % buflen; in rustv0_puny_decode() 203 __func__, n, i, buflen); in rustv0_puny_decode() [all …]
|
/illumos-gate/usr/src/psm/promif/ieee1275/common/ |
H A D | prom_key.c | 41 prom_set_security_key(char *keyname, caddr_t buf, int buflen, int *reslen, in prom_set_security_key() argument 65 if (buflen > 0 && ((uintptr_t)buf > (uint32_t)-1)) { in prom_set_security_key() 67 buf = promplat_alloc(buflen); in prom_set_security_key() 72 promplat_bcopy(obuf, buf, buflen); in prom_set_security_key() 95 ci[5] = p1275_uint2cell(buflen); in prom_set_security_key() 105 promplat_free(buf, buflen); in prom_set_security_key() 123 prom_get_security_key(char *keyname, caddr_t buf, int buflen, int *keylen, in prom_get_security_key() argument 144 buf = promplat_alloc(buflen); in prom_get_security_key() 171 ci[5] = p1275_uint2cell(buflen); in prom_get_security_key() 181 promplat_bcopy(buf, obuf, buflen); in prom_get_security_key() [all …]
|
/illumos-gate/usr/src/lib/smbsrv/libsmb/common/ |
H A D | smb_info.c | 203 smb_getnetbiosname(char *buf, size_t buflen) in smb_getnetbiosname() argument 205 if (smb_gethostname(buf, buflen, SMB_CASE_UPPER) != 0) in smb_getnetbiosname() 208 if (buflen >= NETBIOS_NAME_SZ) in smb_getnetbiosname() 219 smb_getsamaccount(char *buf, size_t buflen) in smb_getsamaccount() argument 221 if (smb_getnetbiosname(buf, buflen - 1) != 0) in smb_getsamaccount() 224 (void) strlcat(buf, "$", buflen); in smb_getsamaccount() 239 smb_gethostname(char *buf, size_t buflen, smb_caseconv_t which) in smb_gethostname() argument 243 if (buf == NULL || buflen == 0) in smb_gethostname() 246 if (gethostname(buf, buflen) != 0) { in smb_gethostname() 251 buf[buflen - 1] = '\0'; in smb_gethostname() [all …]
|
/illumos-gate/usr/src/cmd/dlutil/ |
H A D | dltraninfo.c | 91 size_t *buflen) in dltran_read_page() argument 95 bzero(bufp, *buflen); in dltran_read_page() 101 dti.dti_nbytes = *buflen; in dltran_read_page() 111 *buflen = dti.dti_nbytes; in dltran_read_page() 144 size_t buflen = sizeof (buf); in dltran_hex_dump() local 146 if (dltran_read_page(linkid, tranid, 0xa0, buf, &buflen) != 0) { in dltran_hex_dump() 151 dltran_dump_page(buf, buflen, 0xa0); in dltran_hex_dump() 157 buflen = sizeof (buf); in dltran_hex_dump() 158 if (dltran_read_page(linkid, tranid, 0xa2, buf, &buflen) != 0) { in dltran_hex_dump() 163 dltran_dump_page(buf, buflen, 0xa2); in dltran_hex_dump() [all …]
|
/illumos-gate/usr/src/lib/nsswitch/compat/common/ |
H A D | getpwent.c | 73 validate_passwd_ids(char *line, int *linelenp, int buflen, int extra_chars) in validate_passwd_ids() argument 115 if (newlinelen + extra_chars > buflen) in validate_passwd_ids() 189 int buflen; local 203 buflen = argp->buf.buflen; 206 len = snprintf(s, buflen, "%s:%s", 211 len = snprintf(s, buflen, "%s:%s,%s", 214 len = snprintf(s, buflen, "%s:%s", 218 if (len > buflen) 222 buflen -= len; 223 len = snprintf(s, buflen, ":%u:%u:%s:%s:%s", [all …]
|
/illumos-gate/usr/src/lib/libc/port/gen/ |
H A D | getpwnam_r.c | 57 int buflen); 61 int buflen); 68 getpwnam_r(const char *name, struct passwd *result, char *buffer, int buflen) in getpwnam_r() argument 76 NSS_XbyY_INIT(&arg, result, buffer, buflen, str2passwd); in getpwnam_r() 88 getpwuid_r(uid_t uid, struct passwd *result, char *buffer, int buflen) in getpwuid_r() argument 92 NSS_XbyY_INIT(&arg, result, buffer, buflen, str2passwd); in getpwuid_r() 102 int buflen) in _uncached_getpwuid_r() argument 106 NSS_XbyY_INIT(&arg, result, buffer, buflen, str2passwd); in _uncached_getpwuid_r() 136 int buflen) in _uncached_getpwnam_r() argument 140 NSS_XbyY_INIT(&arg, result, buffer, buflen, str2passwd); in _uncached_getpwnam_r() [all …]
|