Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Changes:
* Redhat Virtio GPUs are now reported as integrated instead of discrete. (GPU, Linux)

Bugfixes:
* Fixed OS detection on FreeBSD when the configured etc directory is `/usr/local/etc` and the release file is in `/etc`. (OS, FreeBSD)
* Fixed libc version detection on FreeBSD without binutils installed, and on DragonFly BSD. (Libc, FreeBSD / DragonFly)
* Fixed CPU cache detection failing entirely when any CPU is offline. (#2736, CPUCache, Linux)
* Fixed the scale factor of rotated monitors on Wayland, e.g. a 1920x1200 monitor rotated by 90 degrees at scale 1 being reported as `@ 1.59x`. (Display, Linux)
Expand Down
8 changes: 8 additions & 0 deletions src/detection/os/os_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,14 @@ static void detectOS(FFOSResult* os) {

parseOsRelease(FASTFETCH_TARGET_DIR_ETC "/os-release", os);

#if defined(__FreeBSD__)
// Ports may set TARGET_DIR_ETC to /usr/local/etc, while FreeBSD's base
// system provides /etc/os-release. Keep the configured path's precedence.
if (os->id.length == 0 && os->name.length == 0 && os->prettyName.length == 0) {
parseOsRelease(FASTFETCH_TARGET_DIR_ROOT "/etc/os-release", os);
}
#endif

if (os->id.length == 0 || os->version.length == 0 || os->prettyName.length == 0 || os->codename.length == 0) {
parseLsbRelease(FASTFETCH_TARGET_DIR_ETC "/lsb-release", os);
}
Expand Down