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)
Fri, Dec 20, 2:18 AM
Unknown Object (File)
Nov 16 2024, 10:15 PM
Unknown Object (File)
Nov 9 2024, 2:11 PM
Unknown Object (File)
Nov 2 2024, 7:02 PM
Unknown Object (File)
Oct 5 2024, 5:00 PM
Unknown Object (File)
Oct 1 2024, 1:19 PM
Unknown Object (File)
Sep 26 2024, 10:19 PM
Unknown Object (File)
Sep 15 2024, 6:58 PM
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.