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, Mar 15, 7:05 AM
Unknown Object (File)
Dec 20 2023, 3:32 AM
Unknown Object (File)
Dec 19 2023, 12:15 AM
Unknown Object (File)
Dec 13 2023, 1:19 AM
Unknown Object (File)
Nov 29 2023, 6:37 AM
Unknown Object (File)
Nov 8 2023, 1:51 PM
Unknown Object (File)
Oct 7 2023, 12:45 PM
Unknown Object (File)
Aug 15 2023, 11:51 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

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

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

markj added inline comments.
usr.bin/uname/uname.1
39

The flag list needs to be updated.

usr.bin/uname/uname.1
39

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.