Home
last modified time | relevance | path

Searched refs:slen (Results 1 – 25 of 209) sorted by relevance

123456789

/illumos-gate/usr/src/lib/libtsnet/common/
H A Dmisc.c125 size_t slen; in rtsa_to_str() local
129 slen = 0; in rtsa_to_str()
133 for (i = 1; mask != 0 && i != 0 && slen < len - 1; i <<= 1) { in rtsa_to_str()
138 if (slen != 0) in rtsa_to_str()
139 line[slen++] = ','; in rtsa_to_str()
148 slen += snprintf(line + slen, len - slen, in rtsa_to_str()
156 slen += snprintf(line + slen, len - slen, "min_sl=%s", in rtsa_to_str()
163 slen += snprintf(line + slen, len - slen, "max_sl=%s", in rtsa_to_str()
169 slen += snprintf(line + slen, len - slen, "doi=%d", in rtsa_to_str()
173 slen += snprintf(line + slen, len - slen, "cipso"); in rtsa_to_str()
/illumos-gate/usr/src/lib/libtecla/common/
H A Dpathutil.c171 if(slen < 0 || slen > strlen(string)) in _pn_append_to_path()
172 slen = strlen(string); in _pn_append_to_path()
176 if(!_pn_resize_path(path, pathlen + slen)) in _pn_append_to_path()
184 for(i=0; i<slen; i++) { in _pn_append_to_path()
198 path->name[pathlen + slen] = '\0'; in _pn_append_to_path()
242 if(slen < 0 || slen > strlen(string)) in _pn_prepend_to_path()
243 slen = strlen(string); in _pn_prepend_to_path()
252 for(shift=0,i=0; i<slen; i++) { in _pn_prepend_to_path()
258 shift = slen; in _pn_prepend_to_path()
275 for(i=j=0; i<slen; i++) { in _pn_prepend_to_path()
[all …]
/illumos-gate/usr/src/lib/libc/port/gen/
H A Dmkstemp.c64 libc_mkstemps(char *as, int slen, int flags) in libc_mkstemps() argument
77 if (slen < 0 || slen >= len) in libc_mkstemps()
80 str = tstr + (len - 1 - slen); in libc_mkstemps()
90 mkret = libc_mktemps(as, slen); in libc_mkstemps()
127 mkstemps(char *as, int slen) in mkstemps() argument
129 return (libc_mkstemps(as, slen, 0)); in mkstemps()
139 mkostemps(char *as, int slen, int flags) in mkostemps() argument
141 return (libc_mkstemps(as, slen, flags)); in mkostemps()
H A Dstrlcpy.c42 size_t slen = strlen(src); in strlcpy() local
46 return (slen); in strlcpy()
48 if (slen >= len) in strlcpy()
51 copied = slen; in strlcpy()
54 return (slen); in strlcpy()
/illumos-gate/usr/src/lib/libc/port/locale/
H A Dwcsxfrm.c43 size_t slen; in wcsxfrm_l() local
53 ((slen = _collate_wxfrm(lcc, src, dest, len)) == (size_t)-1)) { in wcsxfrm_l()
58 if (len > slen) { in wcsxfrm_l()
59 dest[slen] = 0; in wcsxfrm_l()
64 return (slen); in wcsxfrm_l()
67 slen = wcslen(src); in wcsxfrm_l()
68 if (slen < len) in wcsxfrm_l()
74 return (slen); in wcsxfrm_l()
H A Dstrxfrm.c43 size_t slen; in strxfrm_l() local
58 slen = strlen(src); in strxfrm_l()
63 if ((wcs = malloc((slen + 1) * sizeof (wchar_t))) == NULL) in strxfrm_l()
66 if (mbstowcs_l(wcs, src, slen + 1, loc) == (size_t)-1) in strxfrm_l()
89 return (slen); in strxfrm_l()
/illumos-gate/usr/src/lib/smbsrv/libsmbrp/common/
H A Dsmbrp_plugin.c98 int slen; in smb_rpo_deref() local
106 slen = strlen(svc_data) + 1; in smb_rpo_deref()
108 if (slen > *bufsz) { in smb_rpo_deref()
109 *bufsz = slen; in smb_rpo_deref()
127 int slen; in smb_rpo_form() local
132 slen = strlen(svc_data) + 1; in smb_rpo_form()
134 if (slen > *bufsz) { in smb_rpo_form()
135 *bufsz = slen; in smb_rpo_form()
/illumos-gate/usr/src/cmd/cmd-inet/usr.lib/pppoe/
H A Dlogging.c110 int slen; in vlogat() local
140 if (slen < SMALLSTR) { in vlogat()
147 ostr = alloca(slen + 2); in vlogat()
148 slen = vsnprintf(ostr, slen + 1, fmt, args2); in vlogat()
152 if (slen <= 0) in vlogat()
156 if (ostr[slen - 1] != '\n') { in vlogat()
157 ostr[slen++] = '\n'; in vlogat()
158 ostr[slen] = '\0'; in vlogat()
173 slen = nstr - ostr + 1; in vlogat()
182 retv = dowrite(curlogfd, ostr, slen); in vlogat()
[all …]
/illumos-gate/usr/src/lib/libdemangle/common/
H A Ddemangle.c112 size_t slen; in sysdemangle() local
124 slen = strlen(str); in sysdemangle()
149 return (cpp_demangle(str, slen, ops)); in sysdemangle()
151 return (rust_demangle(str, slen, ops)); in sysdemangle()
161 if (!is_mangled(str, slen)) { in sysdemangle()
167 int len = slen > INT_MAX ? INT_MAX : slen; in sysdemangle()
175 res = rust_demangle(str, slen, ops); in sysdemangle()
182 return (cpp_demangle(str, slen, ops)); in sysdemangle()
H A Dstrview.c69 size_t slen = strlen(str); in sv_consume_if() local
71 if (sv->sv_rem < slen) in sv_consume_if()
73 if (strncmp(sv->sv_first, str, slen) != 0) in sv_consume_if()
76 sv->sv_first += slen; in sv_consume_if()
77 sv->sv_rem -= slen; in sv_consume_if()
/illumos-gate/usr/src/lib/libmlrpc/common/
H A Dndr_heap.c203 size_t slen; in ndr_heap_mstring() local
212 slen = ndr__mbstowcs(NULL, s, NDR_STRING_MAX); in ndr_heap_mstring()
213 if (slen == (size_t)-1) in ndr_heap_mstring()
216 out->length = slen * sizeof (ndr_wchar_t); in ndr_heap_mstring()
237 size_t slen; in ndr_heap_mkvcs() local
244 slen = ndr__mbstowcs(NULL, s, NDR_STRING_MAX); in ndr_heap_mkvcs()
245 if (slen == (size_t)-1) in ndr_heap_mkvcs()
246 slen = 0; in ndr_heap_mkvcs()
248 vc->wclen = slen * sizeof (ndr_wchar_t); in ndr_heap_mkvcs()
260 vc->vcs->vc_length_is = slen; in ndr_heap_mkvcs()
[all …]
/illumos-gate/usr/src/cmd/fs.d/nfs/rp_basic/
H A Dlibnfs_basic.c279 int slen, err; in nfs_basic_deref() local
295 slen = xdr_sizeof(xdr_fs_locations4, (void *)fsl); in nfs_basic_deref()
296 if (slen > *bufsz) { in nfs_basic_deref()
297 *bufsz = slen; in nfs_basic_deref()
311 *bufsz = slen; in nfs_basic_deref()
325 int slen; in nfs_basic_form() local
333 slen = strlen(svc_data) + 1; in nfs_basic_form()
334 if (slen > *bufsz) { in nfs_basic_form()
335 *bufsz = slen; in nfs_basic_form()
338 *bufsz = slen; in nfs_basic_form()
[all …]
/illumos-gate/usr/src/lib/libdevinfo/
H A Ddevinfo_realpath.c87 int serrno, slen; in s_realpath() local
193 slen = readlink(resolved, symlink, in s_realpath()
195 if (slen < 0) in s_realpath()
197 symlink[slen] = '\0'; in s_realpath()
216 if (symlink[slen - 1] != '/') { in s_realpath()
217 if (slen + 1 >= sizeof (symlink)) { in s_realpath()
221 symlink[slen] = '/'; in s_realpath()
222 symlink[slen + 1] = 0; in s_realpath()
/illumos-gate/usr/src/common/devid/
H A Ddevid.c196 size_t driver_len, devid_len, slen; in ddi_devid_str_encode() local
233 slen = 2 + 1; /* <magic><rev> "id1" */ in ddi_devid_str_encode()
237 slen += 1; /* '/' */ in ddi_devid_str_encode()
238 slen += strlen(minor_name); /* len of minor_name */ in ddi_devid_str_encode()
240 slen += 1; /* NULL */ in ddi_devid_str_encode()
243 if ((sbuf = DEVID_MALLOC(slen)) == NULL) in ddi_devid_str_encode()
282 DEVID_ASSERT((strlen(sbuf) + 1) == slen); in ddi_devid_str_encode()
339 slen = strlen(devidstr); in devid_str_decode_id()
340 if ((slen < 3) || (devidstr[0] != DEVID_MAGIC_MSB) || in devid_str_decode_id()
345 if ((devidstr[2] == '0') && (slen == 3)) in devid_str_decode_id()
[all …]
/illumos-gate/usr/src/lib/libdwarf/common/
H A Dpro_die.c409 unsigned slen, in make_debug_str_entry() argument
422 mt->dse_slen = slen; in make_debug_str_entry()
446 unsigned slen, in insert_debug_str_data_string() argument
465 if (initial_alloc < slen) { in insert_debug_str_data_string()
484 if (slen > updated_length) { in insert_debug_str_data_string()
486 updated_length = slen *2; in insert_debug_str_data_string()
506 sd->ds_nbytes += slen; in insert_debug_str_data_string()
549 slen,FALSE, 0, error); in _dwarf_insert_or_find_in_debug_str()
620 unsigned slen = strlen(name)+1; in _dwarf_pro_set_string_attr() local
624 new_attr->ar_nbytes = slen; in _dwarf_pro_set_string_attr()
[all …]
/illumos-gate/usr/src/cmd/boot/fiocompress/
H A Dfiocompress.c209 ulong_t slen, dlen; in do_comp() local
213 slen = MIN(srclen, blksize); in do_comp()
215 ret = compress2(dstbuf, &dlen, (Bytef *)srcaddr, slen, 9); in do_comp()
228 srclen -= slen; in do_comp()
229 srcaddr += slen; in do_comp()
252 ulong_t slen, dlen; in do_decomp() local
283 slen = hdr->ch_blkmap[i + 1] - hdr->ch_blkmap[i]; in do_decomp()
284 ret = uncompress(dstbuf, &dlen, (Bytef *)srcaddr, slen); in do_decomp()
299 srcaddr += slen; in do_decomp()
303 slen = hdr->ch_fsize - hdr->ch_blkmap[i]; in do_decomp()
[all …]
/illumos-gate/usr/src/cmd/fm/eversholt/common/
H A Dstable.c144 unsigned slen = 0; in stable() local
156 slen++; in stable()
157 hash ^= (((unsigned)*sptr) << (slen % 3)) + in stable()
158 ((unsigned)*(sptr - 1) << ((slen % 3 + 7))); in stable()
160 hash ^= slen; in stable()
161 if (slen > CHUNK_SIZE - sizeof (char *) - 1 - 4) in stable()
189 (slen + sizeof (char *) + MINPTR_ALIGN + 4)) { in stable()
/illumos-gate/usr/src/test/libc-tests/tests/stdio/
H A Dfmemopentest.c132 size_t len, slen; in writetest() local
135 slen = strlen(string) + 1; in writetest()
137 s1 = fmemopen(string, slen, "w"); in writetest()
148 s1 = fmemopen(string, slen, "r"); in writetest()
178 size_t slen; in seektest() local
181 slen = strlen(string) + 1; in seektest()
183 s1 = fmemopen(string, slen, "r"); in seektest()
/illumos-gate/usr/src/lib/smbsrv/libmlsvc/common/
H A Dnetr_ssp.c144 int slen; in netr_ssp_init() local
169 if (slen >= 0) { in netr_ssp_init()
170 hdr->auth_length += slen + 1; in netr_ssp_init()
177 slen = smb_mbstooem(nam->nam_str + hdr->auth_length, in netr_ssp_init()
179 if (slen >= 0) { in netr_ssp_init()
180 hdr->auth_length += slen + 1; in netr_ssp_init()
192 if (slen >= 0) { in netr_ssp_init()
193 hdr->auth_length += slen; in netr_ssp_init()
198 slen = dn_comp(auth->hostname, nam->nam_str + hdr->auth_length, in netr_ssp_init()
200 if (slen >= 0) { in netr_ssp_init()
[all …]
/illumos-gate/usr/src/lib/libtsol/common/
H A Dbtos.c319 ssize_t slen; /* length including NULL */ in sbsltos() local
331 if ((slen = bsltos(label, &sstring, ssize, in sbsltos()
334 if (slen == 0) { in sbsltos()
354 if ((wstring = malloc(slen * sizeof (wchar_t))) == NULL) in sbsltos()
356 if ((wccount = mbstowcs(wstring, sstring, slen - 1)) == -1) { in sbsltos()
415 ssize_t slen; /* length including NULL */ in sbcleartos() local
427 if ((slen = bcleartos(clearance, &sstring, ssize, in sbcleartos()
430 if (slen == 0) { in sbcleartos()
450 if ((wstring = malloc(slen * sizeof (wchar_t))) == NULL) in sbcleartos()
452 if ((wccount = mbstowcs(wstring, sstring, slen - 1)) == -1) { in sbcleartos()
/illumos-gate/usr/src/lib/libcryptoutil/common/
H A Drandom.c270 pkcs11_seed_random(void *sbuf, size_t slen) in pkcs11_seed_random() argument
274 if (sbuf == NULL || slen == 0) in pkcs11_seed_random()
282 if (pkcs11_write_random_seed(sbuf, slen) == slen) in pkcs11_seed_random()
293 pkcs11_seed_urandom(void *sbuf, size_t slen) in pkcs11_seed_urandom() argument
297 if (sbuf == NULL || slen == 0) in pkcs11_seed_urandom()
305 if (pkcs11_write_urandom_seed(sbuf, slen) == slen) in pkcs11_seed_urandom()
/illumos-gate/usr/src/lib/varpd/libvarpd/common/
H A Dlibvarpd_util.c42 size_t slen; in libvarpd_dirwalk() local
56 slen = strlen(suffix); in libvarpd_dirwalk()
68 if (len <= slen) in libvarpd_dirwalk()
71 if (strcmp(suffix, dp->d_name + (len - slen)) != 0) in libvarpd_dirwalk()
/illumos-gate/usr/src/lib/gss_mechs/mech_krb5/crypto/arcfour/
H A Darcfour_str2key.c27 size_t len,slen; in krb5int_arcfour_string_to_key() local
46 slen = ((string->length)>128)?128:string->length; in krb5int_arcfour_string_to_key()
47 len=(slen)*2; in krb5int_arcfour_string_to_key()
54 asctouni(copystr, (uchar_t *)string->data, slen ); in krb5int_arcfour_string_to_key()
/illumos-gate/usr/src/boot/libsa/
H A Dbootparam.c347 int slen; /* string length */ in xdr_string_decode() local
353 slen = ntohl(*lenp); in xdr_string_decode()
354 plen = (slen + 3) & ~3; in xdr_string_decode()
356 if (slen > *len_p) in xdr_string_decode()
357 slen = *len_p; in xdr_string_decode()
360 bcopy(datap, str, slen); in xdr_string_decode()
362 str[slen] = '\0'; in xdr_string_decode()
363 *len_p = slen; in xdr_string_decode()
/illumos-gate/usr/src/cmd/sed/
H A Dprocess.c379 regoff_t re_off, slen; in substitute() local
396 slen = psl; in substitute()
415 slen -= match[0].rm_eo; in substitute()
418 if (match[0].rm_so < slen) in substitute()
425 } while (slen >= 0 && regexec_e(re, s, REG_NOTBOL, 0, slen)); in substitute()
427 if (slen > 0) in substitute()
435 slen -= match[0].rm_eo; in substitute()
436 if (slen < 0) in substitute()
451 slen -= match[0].rm_eo; in substitute()
659 size_t slen) in regexec_e() argument
[all …]

123456789