Trim unused data from kf_path by truncating the structure size. */
| 4321 | |
| 4322 | /* Trim unused data from kf_path by truncating the structure size. */ |
| 4323 | void |
| 4324 | pack_kinfo(struct kinfo_file *kif) |
| 4325 | { |
| 4326 | |
| 4327 | kif->kf_structsize = offsetof(struct kinfo_file, kf_path) + |
| 4328 | strlen(kif->kf_path) + 1; |
| 4329 | kif->kf_structsize = roundup(kif->kf_structsize, sizeof(uint64_t)); |
| 4330 | } |
| 4331 | |
| 4332 | static void |
| 4333 | export_file_to_kinfo(struct file *fp, int fd, cap_rights_t *rightsp, |
no outgoing calls
no test coverage detected