(path)
| 622 | } |
| 623 | |
| 624 | void |
| 625 | ktrnamei(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 | |
| 650 | void |
| 651 | ktrsysctl(int *name, u_int namelen) |
no test coverage detected