Lines Matching refs:nbytes

169 note_pstatus(struct ps_prochandle *P, size_t nbytes)  in note_pstatus()  argument
175 if (nbytes < sizeof (pstatus32_t) || in note_pstatus()
183 if (nbytes < sizeof (pstatus_t) || in note_pstatus()
198 note_lwpstatus(struct ps_prochandle *P, size_t nbytes) in note_lwpstatus() argument
207 if (nbytes < sizeof (lwpstatus32_t) || in note_lwpstatus()
214 if (nbytes < sizeof (lwpstatus_t) || in note_lwpstatus()
240 note_psinfo(struct ps_prochandle *P, size_t nbytes) in note_psinfo() argument
246 if (nbytes < sizeof (psinfo32_t) || in note_psinfo()
253 if (nbytes < sizeof (psinfo_t) || in note_psinfo()
269 note_lwpsinfo(struct ps_prochandle *P, size_t nbytes) in note_lwpsinfo() argument
278 if (nbytes < sizeof (lwpsinfo32_t) || in note_lwpsinfo()
285 if (nbytes < sizeof (lwpsinfo_t) || in note_lwpsinfo()
303 note_platform(struct ps_prochandle *P, size_t nbytes) in note_platform() argument
310 if (nbytes != 0 && ((plat = malloc(nbytes + 1)) != NULL)) { in note_platform()
311 if (read(P->asfd, plat, nbytes) != nbytes) { in note_platform()
316 plat[nbytes - 1] = '\0'; in note_platform()
324 note_utsname(struct ps_prochandle *P, size_t nbytes) in note_utsname() argument
329 if (P->core->core_uts != NULL || nbytes < ubytes) in note_utsname()
354 note_content(struct ps_prochandle *P, size_t nbytes) in note_content() argument
358 if (sizeof (P->core->core_content) != nbytes) in note_content()
372 note_cred(struct ps_prochandle *P, size_t nbytes) in note_cred() argument
384 if (P->core->core_cred != NULL || nbytes < min_size) in note_cred()
387 ngroups = (nbytes - min_size) / sizeof (gid_t); in note_cred()
388 nbytes = sizeof (prcred_t) + (ngroups - 1) * sizeof (gid_t); in note_cred()
390 if ((pcrp = malloc(nbytes)) == NULL) in note_cred()
393 if (read(P->asfd, pcrp, nbytes) != nbytes) { in note_cred()
411 note_ldt(struct ps_prochandle *P, size_t nbytes) in note_ldt() argument
416 if (P->core->core_ldt != NULL || nbytes < sizeof (struct ssd)) in note_ldt()
419 nldt = nbytes / sizeof (struct ssd); in note_ldt()
420 nbytes = nldt * sizeof (struct ssd); in note_ldt()
422 if ((pldt = malloc(nbytes)) == NULL) in note_ldt()
425 if (read(P->asfd, pldt, nbytes) != nbytes) { in note_ldt()
438 note_priv(struct ps_prochandle *P, size_t nbytes) in note_priv() argument
442 if (P->core->core_priv != NULL || nbytes < sizeof (prpriv_t)) in note_priv()
445 if ((pprvp = malloc(nbytes)) == NULL) in note_priv()
448 if (read(P->asfd, pprvp, nbytes) != nbytes) { in note_priv()
455 P->core->core_priv_size = nbytes; in note_priv()
460 note_priv_info(struct ps_prochandle *P, size_t nbytes) in note_priv_info() argument
466 nbytes < sizeof (priv_impl_info_t)) in note_priv_info()
469 if ((ppii = malloc(nbytes)) == NULL) in note_priv_info()
472 if (read(P->asfd, ppii, nbytes) != nbytes || in note_priv_info()
473 PRIV_IMPL_INFO_SIZE(ppii) != nbytes) { in note_priv_info()
485 note_zonename(struct ps_prochandle *P, size_t nbytes) in note_zonename() argument
492 if (nbytes != 0) { in note_zonename()
493 if ((zonename = malloc(nbytes)) == NULL) in note_zonename()
495 if (read(P->asfd, zonename, nbytes) != nbytes) { in note_zonename()
500 zonename[nbytes - 1] = '\0'; in note_zonename()
508 note_auxv(struct ps_prochandle *P, size_t nbytes) in note_auxv() argument
516 n = nbytes / sizeof (auxv32_t); in note_auxv()
517 nbytes = n * sizeof (auxv32_t); in note_auxv()
518 a32 = alloca(nbytes); in note_auxv()
520 if (read(P->asfd, a32, nbytes) != nbytes) { in note_auxv()
533 n = nbytes / sizeof (auxv_t); in note_auxv()
534 nbytes = n * sizeof (auxv_t); in note_auxv()
536 if ((P->auxv = malloc(nbytes + sizeof (auxv_t))) == NULL) in note_auxv()
539 if (read(P->asfd, P->auxv, nbytes) != nbytes) { in note_auxv()
569 note_xreg(struct ps_prochandle *P, size_t nbytes) in note_xreg() argument
575 if (lwp == NULL || lwp->lwp_xregs != NULL || nbytes < xbytes) in note_xreg()
592 note_gwindows(struct ps_prochandle *P, size_t nbytes) in note_gwindows() argument
596 if (lwp == NULL || lwp->lwp_gwins != NULL || nbytes == 0) in note_gwindows()
613 (void) read(P->asfd, &g32, MIN(nbytes, sizeof (g32))); in note_gwindows()
620 MIN(nbytes, sizeof (gwindows_t))); in note_gwindows()
629 note_asrs(struct ps_prochandle *P, size_t nbytes) in note_asrs() argument
634 if (lwp == NULL || lwp->lwp_asrs != NULL || nbytes < sizeof (asrset_t)) in note_asrs()
654 note_notsup(struct ps_prochandle *P, size_t nbytes) in note_notsup() argument
1535 size_t nbytes; in core_load_shdrs() local
1555 nbytes = efp->e_hdr.e_shnum * efp->e_hdr.e_shentsize; in core_load_shdrs()
1556 if ((buf = malloc(nbytes)) == NULL) { in core_load_shdrs()
1557 dprintf("failed to malloc %d bytes: %s\n", (int)nbytes, in core_load_shdrs()
1563 if (pread64(efp->e_fd, buf, nbytes, efp->e_hdr.e_shoff) != nbytes) { in core_load_shdrs()
1681 size_t nbytes; in Pfgrab_core() local
1790 nbytes = core.e_hdr.e_phnum * core.e_hdr.e_phentsize; in Pfgrab_core()
1792 if ((phbuf = malloc(nbytes)) == NULL) { in Pfgrab_core()
1797 if (pread64(core_fd, phbuf, nbytes, core.e_hdr.e_phoff) != nbytes) { in Pfgrab_core()