Page MenuHomeFreeBSD

linux: Make uname less weird
Needs ReviewPublic

Authored by trasz on Apr 11 2023, 4:22 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Feb 9, 2:02 PM
Unknown Object (File)
Jan 29 2025, 8:46 PM
Unknown Object (File)
Jan 27 2025, 8:46 PM
Unknown Object (File)
Jan 22 2025, 2:21 AM
Unknown Object (File)
Dec 12 2024, 6:09 AM
Unknown Object (File)
Nov 24 2024, 11:25 PM
Unknown Object (File)
Nov 12 2024, 4:42 AM
Unknown Object (File)
Nov 12 2024, 2:52 AM
Subscribers

Details

Reviewers
None
Group Reviewers
Linux Emulation
Summary

In Linux most of the identifying kernel information belongs in
osrelease, the one reported by "uname -r". Version ("uname -v")
contains mostly the build number and timestamp, and tools like
neofetch(1) don't even bother reporting it.

Before:
Linux pustak 4.4.0 FreeBSD 14.0-CURRENT #1 main-n262054-cc3793b1c548: Sun Apr 9 21 x86_64 x86_64 x86_64 GNU/Linux

After:
Linux pustak 4.4.0-freebsd14.0-current #1 main-n262054-cc3793b1c548: Sun Apr 9 21:06:31 BST 2023 x86_64 x86_64 x86_64 GNU/Linux

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 50838
Build 47729: arc lint + arc unit

Event Timeline

trasz requested review of this revision.Apr 11 2023, 4:22 PM

Would you mind showing example before/after uname results?

well, the part after a dash is not standart, depends on a distributive, so we can put here any information, and it would be nice to print p_osrel of the current process here.
However, I would propose completely remove the pr_osrelease from struct linux_prison as we have pr_osrel and due to the pr_osrelease was intended to map into the vdso page at the Note section. But its not possible due to jails and can be removed now.

well, the part after a dash is not standart, depends on a distributive, so we can put here any information, and it would be nice to print p_osrel of the current process here.
However, I would propose completely remove the pr_osrelease from struct linux_prison as we have pr_osrel and due to the pr_osrelease was intended to map into the vdso page at the Note section. But its not possible due to jails and can be removed now.

I think I get what you are saying, but I'm not sure if I understand the code enough to rip it out safely.