| /NextBSD/bin/ps/ |
| HD | nlist.c | 54 size_t oldlen; in donlist() local 56 oldlen = sizeof(ccpu); in donlist() 57 if (sysctlbyname("kern.ccpu", &ccpu, &oldlen, NULL, 0) == -1) in donlist() 59 oldlen = sizeof(fscale); in donlist() 60 if (sysctlbyname("kern.fscale", &fscale, &oldlen, NULL, 0) == -1) in donlist() 62 oldlen = sizeof(mempages); in donlist() 63 if (sysctlbyname("hw.availpages", &mempages, &oldlen, NULL, 0) == -1) in donlist()
|
| /NextBSD/contrib/dtc/libfdt/ |
| HD | fdt_rw.c | 97 static int _fdt_splice(void *fdt, void *splicepoint, int oldlen, int newlen) in _fdt_splice() argument 102 if (((p + oldlen) < p) || ((p + oldlen) > end)) in _fdt_splice() 104 if ((end - oldlen + newlen) > ((char *)fdt + fdt_totalsize(fdt))) in _fdt_splice() 106 memmove(p + newlen, p + oldlen, end - p - oldlen); in _fdt_splice() 124 int oldlen, int newlen) in _fdt_splice_struct() argument 126 int delta = newlen - oldlen; in _fdt_splice_struct() 129 if ((err = _fdt_splice(fdt, p, oldlen, newlen))) in _fdt_splice_struct() 208 int oldlen; in _fdt_resize_property() local 211 *prop = fdt_get_property_w(fdt, nodeoffset, name, &oldlen); in _fdt_resize_property() 213 return oldlen; in _fdt_resize_property() [all …]
|
| /NextBSD/sys/contrib/libfdt/ |
| HD | fdt_rw.c | 97 static int _fdt_splice(void *fdt, void *splicepoint, int oldlen, int newlen) in _fdt_splice() argument 102 if (((p + oldlen) < p) || ((p + oldlen) > end)) in _fdt_splice() 104 if ((end - oldlen + newlen) > ((char *)fdt + fdt_totalsize(fdt))) in _fdt_splice() 106 memmove(p + newlen, p + oldlen, end - p - oldlen); in _fdt_splice() 124 int oldlen, int newlen) in _fdt_splice_struct() argument 126 int delta = newlen - oldlen; in _fdt_splice_struct() 129 if ((err = _fdt_splice(fdt, p, oldlen, newlen))) in _fdt_splice_struct() 208 int oldlen; in _fdt_resize_property() local 211 *prop = fdt_get_property_w(fdt, nodeoffset, name, &oldlen); in _fdt_resize_property() 213 return oldlen; in _fdt_resize_property() [all …]
|
| /NextBSD/libexec/casper/sysctl/ |
| HD | sysctl.c | 180 size_t oldlen, newlen; in sysctl_command() local 208 oldlen = 0; in sysctl_command() 209 oldlenp = &oldlen; in sysctl_command() 213 oldlen = (size_t)nvlist_get_number(nvlin, "oldlen"); in sysctl_command() 214 if (oldlen == 0) in sysctl_command() 216 oldp = calloc(1, oldlen); in sysctl_command() 219 oldlenp = &oldlen; in sysctl_command() 223 oldlen = 0; in sysctl_command() 235 nvlist_add_number(nvlout, "oldlen", (uint64_t)oldlen); in sysctl_command() 237 nvlist_move_binary(nvlout, "oldp", oldp, oldlen); in sysctl_command()
|
| /NextBSD/tests/sys/kern/ |
| HD | kern_descrip_test.c | 137 size_t oldlen; in ATF_TC_BODY() local 141 oldlen = sizeof(maxfiles); in ATF_TC_BODY() 142 if (sysctlbyname("kern.maxfiles", &maxfiles, &oldlen, NULL, 0) == -1) in ATF_TC_BODY() 145 if (sysctlbyname("kern.openfiles", ¤t, &oldlen, NULL, 0) == -1) in ATF_TC_BODY() 158 if (sysctlbyname("kern.maxfiles", NULL, 0, &maxfiles, oldlen) == -1) in ATF_TC_BODY() 168 size_t oldlen; in ATF_TC_CLEANUP() local 175 oldlen = sizeof(oldmaxfiles); in ATF_TC_CLEANUP() 177 &oldmaxfiles, oldlen); in ATF_TC_CLEANUP()
|
| /NextBSD/lib/libcapsicum/ |
| HD | libcapsicum_sysctl.c | 48 size_t oldlen; in cap_sysctlbyname() local 78 retoldp = nvlist_get_binary(nvl, "oldp", &oldlen); in cap_sysctlbyname() 79 memcpy(oldp, retoldp, oldlen); in cap_sysctlbyname() 81 *oldlenp = oldlen; in cap_sysctlbyname()
|
| /NextBSD/contrib/netbsd-tests/kernel/ |
| HD | t_sysctl.c | 54 size_t oldlen = len; in ATF_TC_BODY() local 57 r = sysctlbyname("kern.job_control", &buf, &oldlen, 0, (size_t) 0); in ATF_TC_BODY() 64 ATF_REQUIRE_EQ(oldlen, sizeof(int)); in ATF_TC_BODY()
|
| /NextBSD/bin/sh/ |
| HD | memalloc.c | 242 int oldlen; in growstackblock() local 257 oldlen = stacknleft; in growstackblock() 273 if (oldlen != 0) in growstackblock() 274 memcpy(p, oldspace, oldlen); in growstackblock()
|
| /NextBSD/crypto/heimdal/lib/asn1/ |
| HD | der_get.c | 49 size_t oldlen = len; in der_get_unsigned() local 59 if(size) *size = oldlen; in der_get_unsigned() 68 size_t oldlen = len; in der_get_integer() local 79 if(size) *size = oldlen; in der_get_integer() 279 size_t l, datalen, oldlen = len; in der_get_octet_string_ber() local 330 if(size) *size = oldlen - len; in der_get_octet_string_ber() 466 size_t oldlen = len; in der_get_oid() local 505 *size = oldlen; in der_get_oid()
|
| HD | template.c | 154 size_t oldlen = len; in _asn1_decode() local 418 oldlen -= len; in _asn1_decode() 421 *size = oldlen; in _asn1_decode() 430 save->data = malloc(oldlen); in _asn1_decode() 434 save->length = oldlen; in _asn1_decode() 435 memcpy(save->data, startp, oldlen); in _asn1_decode() 446 size_t oldlen = len; in _asn1_encode() local 692 *size = oldlen - len; in _asn1_encode()
|
| /NextBSD/contrib/groff/src/libs/libgroff/ |
| HD | string.cpp | 29 static char *srealloc(char *ptr, int size, int oldlen, int newlen, int *sizep); 61 static char *srealloc(char *ptr, int oldsz, int oldlen, int newlen, int *sizep) in srealloc() argument 74 if (oldlen < newlen && oldlen != 0) in srealloc() 75 memcpy(p, ptr, oldlen); in srealloc()
|
| /NextBSD/contrib/dtc/ |
| HD | fdtput.c | 157 int oldlen = 0; in realloc_property() local 159 if (!fdt_get_property(fdt, nodeoffset, name, &oldlen)) in realloc_property() 163 if (newlen > oldlen) in realloc_property() 165 delta += ALIGN(newlen) - ALIGN(oldlen); in realloc_property()
|
| /NextBSD/usr.sbin/extattr/ |
| HD | rmextattr.c | 85 mkbuf(char **buf, int *oldlen, int newlen) in mkbuf() argument 88 if (*oldlen >= newlen) in mkbuf() 95 *oldlen = newlen; in mkbuf()
|
| /NextBSD/lib/libc/rpc/ |
| HD | bindresvport.c | 124 socklen_t oldlen = sizeof(old); in bindresvport_sa() local 126 error = _getsockopt(sd, proto, portrange, &old, &oldlen); in bindresvport_sa()
|
| /NextBSD/sbin/fsck_ffs/ |
| HD | dir.c | 345 int newlen, oldlen; in mkentry() local 350 oldlen = DIRSIZ(0, dirp); in mkentry() 352 oldlen = 0; in mkentry() 353 if (dirp->d_reclen - oldlen < newlen) in mkentry() 355 newent.d_reclen = dirp->d_reclen - oldlen; in mkentry() 356 dirp->d_reclen = oldlen; in mkentry() 357 dirp = (struct direct *)(((char *)dirp) + oldlen); in mkentry()
|
| /NextBSD/sys/kern/ |
| HD | kern_sysctl.c | 1515 if (req->oldlen <= req->oldidx) in sysctl_old_kernel() 1518 if (i > req->oldlen - req->oldidx) in sysctl_old_kernel() 1519 i = req->oldlen - req->oldidx; in sysctl_old_kernel() 1554 req.oldlen = *oldlenp; in kernel_sysctl() 1556 req.validlen = req.oldlen; in kernel_sysctl() 1677 wiredlen = (len > 0 && len < req->oldlen) ? len : req->oldlen; in sysctl_wire_old_buffer() 1903 req.oldlen = *oldlenp; in userland_sysctl() 1905 error = copyin(oldlenp, &req.oldlen, sizeof(*oldlenp)); in userland_sysctl() 1910 req.validlen = req.oldlen; in userland_sysctl() 1913 if (!useracc(old, req.oldlen, VM_PROT_WRITE)) in userland_sysctl() [all …]
|
| HD | imgact_binmisc.c | 497 if (!req->oldlen) in sysctl_kern_binmisc()
|
| HD | kern_mib.c | 165 len = read_random(buf, MIN(req->oldlen, sizeof(buf))); in sysctl_kern_arnd()
|
| /NextBSD/sys/dev/aic7xxx/aicasm/ |
| HD | aicasm_gram.y | 1917 int oldlen; in add_version() local 1920 oldlen = 0; in add_version() 1922 oldlen = strlen(versions); in add_version() 1923 versions = realloc(versions, newlen + oldlen + 2); in add_version() 1926 strcpy(&versions[oldlen], verprefix); in add_version() 1927 strcpy(&versions[oldlen + strlen(verprefix)], verstring); in add_version() 1928 versions[newlen + oldlen] = '\n'; in add_version() 1929 versions[newlen + oldlen + 1] = '\0'; in add_version()
|
| /NextBSD/usr.bin/sed/ |
| HD | compile.c | 651 size_t oclen, oldlen, nclen, newlen; in compile_tr() local 673 oldlen = mbsrtowcs(NULL, &op, 0, NULL); in compile_tr() 674 if (oldlen == (size_t)-1) in compile_tr() 680 if (newlen != oldlen) in compile_tr()
|
| /NextBSD/contrib/binutils/opcodes/ |
| HD | mep-asm.c | 497 int oldlen; in str_append() local 502 oldlen = (dest ? strlen(dest) : 0); in str_append() 503 new_dest = realloc (dest, oldlen + len + 1); in str_append() 504 memset (new_dest + oldlen, 0, len + 1); in str_append()
|
| /NextBSD/contrib/ntp/lib/isc/ |
| HD | lex.c | 333 unsigned int oldlen; in pushandgrow() local 337 oldlen = isc_buffer_length(source->pushback); in pushandgrow() 338 result = isc_buffer_allocate(lex->mctx, &tbuf, oldlen * 2); in pushandgrow()
|
| /NextBSD/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ |
| HD | zfs_vfsops.c | 2489 size_t oldlen; in zfsvfs_update_fromname() local 2491 oldlen = strlen(oldname); in zfsvfs_update_fromname() 2501 if (strncmp(fromname, oldname, oldlen) == 0 && in zfsvfs_update_fromname() 2502 (fromname[oldlen] == '/' || fromname[oldlen] == '@')) { in zfsvfs_update_fromname() 2504 newname, fromname + oldlen); in zfsvfs_update_fromname()
|
| /NextBSD/sys/netinet/ |
| HD | tcp_fastopen.c | 427 if (req->oldptr != NULL || req->oldlen != 0) in sysctl_net_inet_tcp_fastopen_setkey()
|
| /NextBSD/contrib/ntp/sntp/libevent/test/ |
| HD | regress.c | 2267 int oldlen, newlen; in evtag_int_test() local 2268 oldlen = (int)EVBUFFER_LENGTH(tmp); in evtag_int_test() 2272 (unsigned)integers[i], newlen - oldlen)); in evtag_int_test() 2344 int oldlen, newlen; in evtag_tag_encoding() local 2345 oldlen = (int)EVBUFFER_LENGTH(tmp); in evtag_tag_encoding() 2349 (unsigned)integers[i], newlen - oldlen)); in evtag_tag_encoding()
|