Use the kern.bootfile sysctl to set the default kernel path rather
than hardcoding /boot/kernel. This allows pmcstat(8) to work without
-k when using nextboot -k or 'boot foo' at the loader to boot alternate
kernels.
Details
Details
- Boot a kernel not named /boot/kernel/kernel and verify pmcstat without -k outputs sensible symbols instead of bizarre ones.
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
usr.sbin/pmcstat/pmcstat.c | ||
---|---|---|
615 ↗ | (On Diff #5143) | Minor point, should k still work even if kern.bootfile fails? |
usr.sbin/pmcstat/pmcstat.c | ||
---|---|---|
615 ↗ | (On Diff #5143) | I almost did that but decided against it. I don't think kern.bootfile can ever fail as it is always present. It can only fail if malloc() returns NULL perhaps (which I should check for). However, I do think there is the question of if the default should be kern.bootfile or /boot/kernel if -r is specified. I suspect it is probably just simpler to have it always be kern.bootfile though than to try to have it be too smart. |