| 2515 | } |
| 2516 | |
| 2517 | static inline void |
| 2518 | vn_fill_junk(struct kinfo_file *kif) |
| 2519 | { |
| 2520 | size_t len, olen; |
| 2521 | |
| 2522 | /* |
| 2523 | * Simulate vn_fullpath returning changing values for a given |
| 2524 | * vp during e.g. coredump. |
| 2525 | */ |
| 2526 | len = (arc4random() % (sizeof(kif->kf_path) - 2)) + 1; |
| 2527 | olen = strlen(kif->kf_path); |
| 2528 | if (len < olen) |
| 2529 | strcpy(&kif->kf_path[len - 1], "$"); |
| 2530 | else |
| 2531 | for (; olen < len; olen++) |
| 2532 | strcpy(&kif->kf_path[olen], "A"); |
| 2533 | } |
| 2534 | |
| 2535 | int |
| 2536 | vn_fill_kinfo_vnode(struct vnode *vp, struct kinfo_file *kif) |
no test coverage detected