Page MenuHomeFreeBSD

Expose build-ID through `uname -b`
ClosedPublic

Authored by emaste on Jun 4 2019, 1:12 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Sep 25, 9:16 PM
Unknown Object (File)
Fri, Sep 19, 1:22 PM
Unknown Object (File)
Aug 4 2025, 4:47 AM
Unknown Object (File)
Aug 2 2025, 8:08 AM
Unknown Object (File)
Jul 26 2025, 10:35 AM
Unknown Object (File)
Jul 6 2025, 8:55 PM
Unknown Object (File)
Jul 4 2025, 6:38 AM
Unknown Object (File)
Jun 30 2025, 7:33 AM
Subscribers

Details

Summary

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

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Submitted by: @ali_mashtizadeh.com
Relnotes: Yes
Event: Waterloo Hackathon 2019

markj added inline comments.
usr.bin/uname/uname.1
39 ↗(On Diff #58224)

The flag list needs to be updated.

usr.bin/uname/uname.1
39 ↗(On Diff #58224)

Thanks, fixed locally.

This revision is now accepted and ready to land.Jun 27 2019, 8:25 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

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

This revision was automatically updated to reflect the committed changes.