Page MenuHomeFreeBSD

Expose build-ID through `uname -b`

Authored by emaste on Jun 4 2019, 1:12 PM.



After rS348611 the kernel's build-ID is available via sysctl. Add a -b flag to uname to report it.

Diff Detail

rS FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

emaste created this revision.Jun 4 2019, 1:12 PM

Submitted by:
Relnotes: Yes
Event: Waterloo Hackathon 2019

markj added a subscriber: markj.Jun 27 2019, 8:21 PM
markj added inline comments.
39 ↗(On Diff #58224)

The flag list needs to be updated.

emaste added inline comments.Jun 27 2019, 8:24 PM
39 ↗(On Diff #58224)

Thanks, fixed locally.

markj accepted this revision.Jun 27 2019, 8:25 PM
This revision is now accepted and ready to land.Jun 27 2019, 8:25 PM
imp added a comment.Jun 27 2019, 8:26 PM

Looks good. What do we do if we can't get the string?

@imp asked on IRC what would happen if run on a kernel without the kern.build_id sysctl - it would report:

volta% usr.bin/uname/obj/uname -b
uname: sysctlbyname: No such file or directory
imp accepted this revision.Jun 27 2019, 8:30 PM

OK. that works for me. thanks for the answer.

This revision was automatically updated to reflect the committed changes.