MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ktrnamei

Function ktrnamei

freebsd/kern/kern_ktrace.c:624–648  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

622}
623
624void
625ktrnamei(path)
626 char *path;
627{
628 struct ktr_request *req;
629 int namelen;
630 char *buf = NULL;
631
632 namelen = strlen(path);
633 if (namelen > 0) {
634 buf = malloc(namelen, M_KTRACE, M_WAITOK);
635 bcopy(path, buf, namelen);
636 }
637 req = ktr_getrequest(KTR_NAMEI);
638 if (req == NULL) {
639 if (buf != NULL)
640 free(buf, M_KTRACE);
641 return;
642 }
643 if (namelen > 0) {
644 req->ktr_header.ktr_len = namelen;
645 req->ktr_buffer = buf;
646 }
647 ktr_submitrequest(curthread, req);
648}
649
650void
651ktrsysctl(int *name, u_int namelen)

Callers 3

vn_getcwdFunction · 0.85
shm_copyin_pathFunction · 0.85
nameiFunction · 0.85

Calls 4

mallocFunction · 0.85
ktr_getrequestFunction · 0.85
ktr_submitrequestFunction · 0.85
freeFunction · 0.70

Tested by

no test coverage detected