Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
9e1b130
Host (Android): add detection for OnePlus market name
CarterLi May 26, 2025
fde5f3b
Packaging: update debian stuff [ci skip]
CarterLi May 26, 2025
73c0347
Merge remote-tracking branch 'origin/dev' into dev
CarterLi May 26, 2025
7a8ffb2
Packages: split code
CarterLi May 26, 2025
a7d623f
JsonSchema: update `<module>Format` [ci skip]
CarterLi May 29, 2025
f8479da
GPU: add more GPU vendors
CarterLi May 30, 2025
0cd8c6e
Chore: code cleanup
CarterLi May 30, 2025
4df4a1d
Logo (Builtin): add Starry Linux
CarterLi May 30, 2025
b931773
WM: support CTWM version detection
CarterLi May 31, 2025
f389864
WM: support FVWM version detection
CarterLi May 31, 2025
1875c78
WM: support I3 version detection
CarterLi May 31, 2025
eeceade
Logo (Builtin): add rhel_small
CarterLi May 31, 2025
2f4146f
Logo (Builtin): update default colors of voidlinux
CarterLi May 31, 2025
2853bd1
Logo (Builtin): add void2
CarterLi May 31, 2025
c8debcc
DE (FreeBSD): support KDE version detection
CarterLi Jun 2, 2025
81b7fb0
Fix typo, 15,2 isn't a real mac model number
anshnk Jun 1, 2025
d94a41c
Chore: tidy
CarterLi Jun 2, 2025
08ed14b
Logo: support `"type": "command-raw"`
CarterLi Jun 2, 2025
047411b
CMake: build FreeBSD `pkg` package
CarterLi Jun 2, 2025
fb68d8a
CI (Haiku): add build
CarterLi Jun 2, 2025
d60b2dd
Disk (Linux): don't ignore sshfs
CarterLi Jun 2, 2025
1f96784
CMake: fix build of FreeBSD
CarterLi Jun 2, 2025
8db70b4
CI: add back disabled DFBSD
CarterLi Jun 2, 2025
e203f4e
Packages (Linux): fix dnf package count detection
CarterLi Jun 3, 2025
4b2fa07
Packages (Linux): fix dnf package count detection (v2)
CarterLi Jun 3, 2025
6b94605
Disk (BSD): don't ignore sshfs
CarterLi Jun 2, 2025
35235b9
Logo (Builtin): Update logo for Xenia Linux (#1783)
amnexya Jun 3, 2025
bbb29ff
CI (Linux): add missing deps for musl
CarterLi Jun 3, 2025
d7a8c92
CI (Linux): fix musl build
CarterLi Jun 4, 2025
4c34f99
Swap (Linux): use `/proc/swaps`
CarterLi Jun 4, 2025
7107d08
DE (DragonFly): fix build
CarterLi Jun 3, 2025
9d2df58
Smbios (DragonFly): acquire SMBIOS info from `/dev/mem`
CarterLi Jun 3, 2025
7ec0c66
Swap (Windows): detect detailed info
CarterLi Jun 4, 2025
3d4a117
Swap: support separated output
CarterLi Jun 4, 2025
5fdc924
Swap (macOS): detect detailed info
CarterLi Jun 4, 2025
fa4b00b
Swap (FreeBSD): detect detailed info
CarterLi Jun 4, 2025
2c80cd6
Swap (Linux): support detailed info
CarterLi Jun 4, 2025
6a6b407
Swap (Linux): add fallback for Android
CarterLi Jun 4, 2025
5883bf3
Swap (OpenBSD): detect detailed info
CarterLi Jun 4, 2025
6a42588
Swap (SunOS): detect detailed info
CarterLi Jun 4, 2025
d89263c
Swap (DragonFly): add support
CarterLi Jun 4, 2025
04b1309
Swap (Haiku): detect detailed info
CarterLi Jun 4, 2025
5e0ba57
Disk (BSD): silence compiler warnings
CarterLi Jun 4, 2025
64d4035
Chore (Haiku): don't use hard-coded page size
CarterLi Jun 4, 2025
d8e74ba
Release: v2.45.0
CarterLi Jun 5, 2025
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
76 changes: 75 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ jobs:
run: |
cat /etc/alpine-release
uname -a
apk add cmake samurai vulkan-loader-dev libxcb-dev wayland-dev libdrm-dev dconf-dev imagemagick-dev chafa-dev zlib-dev dbus-dev mesa-dev opencl-dev xfconf-dev sqlite-dev networkmanager-dev pulseaudio-dev ddcutil-dev elfutils-dev gcc g++
apk add cmake samurai vulkan-loader-dev libxcb-dev libxrandr-dev rpm-dev wayland-dev libdrm-dev dconf-dev imagemagick-dev chafa-dev zlib-dev dbus-dev mesa-dev opencl-dev xfconf-dev sqlite-dev networkmanager-dev pulseaudio-dev ddcutil-dev elfutils-dev gcc g++
shell: alpine.sh --root {0}

- name: build
Expand Down Expand Up @@ -597,6 +597,80 @@ jobs:
name: fastfetch-netbsd-amd64
path: ./fastfetch-*.*

dragonfly-amd64:
name: DragonFly-amd64
runs-on: ubuntu-latest
if: false
permissions:
security-events: write
contents: read
steps:
- name: checkout repository
uses: actions/checkout@v4

- name: run VM
uses: vmactions/dragonflybsd-vm@v1
with:
usesh: yes
prepare: |
uname -a
pkg update
pkg install -y cmake git pkgconf binutils wayland vulkan-headers vulkan-loader libxcb libXrandr libX11 libdrm glib dconf dbus sqlite3-tcl xfce4-conf egl opencl ocl-icd v4l_compat chafa libelf

run: |
cmake -DSET_TWEAK=Off -DBUILD_TESTS=On -DENABLE_EMBEDDED_PCIIDS=On -DENABLE_EMBEDDED_AMDGPUIDS=On .
cmake --build . --target package --verbose -j4
./fastfetch --list-features
time ./fastfetch -c presets/ci.jsonc --stat false
time ./fastfetch -c presets/ci.jsonc --format json
time ./flashfetch
ldd fastfetch
ctest --output-on-failure

- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: fastfetch-dragonfly-amd64
path: ./fastfetch-*.*

haiku-amd64:
name: Haiku-amd64
runs-on: ubuntu-latest
if: false
permissions:
security-events: write
contents: read
steps:
- name: checkout repository
uses: actions/checkout@v4

- name: run VM
uses: cross-platform-actions/action@master
with:
operating_system: haiku
architecture: x86-64
cpu_count: 4
shell: bash
version: 'r1beta5'
run: |
uname -a
ls -l
pkgman install -y git dbus_devel mesa_devel libelf_devel imagemagick_devel opencl_headers ocl_icd_devel vulkan_devel zlib_devel chafa_devel cmake gcc make pkgconfig python3.10
cmake -DSET_TWEAK=Off -DBUILD_TESTS=On -DENABLE_EMBEDDED_PCIIDS=On -DENABLE_EMBEDDED_AMDGPUIDS=On .
cmake --build . --target package --verbose -j4
./fastfetch --list-features
time ./fastfetch -c presets/ci.jsonc --stat false
time ./fastfetch -c presets/ci.jsonc --format json
time ./flashfetch
ldd fastfetch
ctest --output-on-failure

- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: fastfetch-haiku-amd64
path: ./fastfetch-*.*

windows-amd64:
name: Windows-amd64
runs-on: windows-latest
Expand Down
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
# 2.45.0

Features:
* Support OnePlus marketing name detection (#1768, Host, Android)
* Recognize additional GPU vendors (GPU, Linux)
* Support CTWM, FVWM and I3 window manager version detection (WM)
* Support KDE version detection on *BSD (DE, FreeBSD)
* Support `"logo": { "type": "command-raw" }` to run a command and display its output as logo (#1780, Logo)
* Useful for displaying custom logos generated by other programs such as `pokeget`: `{ "type": "command-raw", "source": "pokeget random --hide-name" }`
* Supported in JSONC config file only. `pokeget random --hide-name | fastfetch --file-raw -` should be used in shell.
* Acquire SMBIOS information on DragonFly BSD from `/dev/mem`; legacy BIOS only (PhysicalMemory, DragonFly)
* Support swap usage detection on DragonFly BSD (Swap, DragonFly)
* Support `--swap-separate` to display detailed swap devices on separate lines (Swap)

Bugfixes
* Fix MacBook Air model name (#1779, Host, macOS)
* Don't ignore sshfs mountpoints (#1776, Disk, Linux / FreeBSD)
* Fix dnf package count detection (#1777, Packages, Linux)

Logos:
* Add Starry Linux (#1771)
* Add rhel_small (#1774)
* Update color palette of voidlinux (#1775)
* Add void2
* Update Xenia Linux (#1783)

# 2.44.0

Features:
Expand Down
21 changes: 13 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.12.0) # target_link_libraries with OBJECT libs & project homepage url

project(fastfetch
VERSION 2.44.0
VERSION 2.45.0
LANGUAGES C
DESCRIPTION "Fast neofetch-like system information tool"
HOMEPAGE_URL "https://github.com/fastfetch-cli/fastfetch"
Expand Down Expand Up @@ -787,7 +787,7 @@ elseif(NetBSD)
src/detection/netio/netio_bsd.c
src/detection/opengl/opengl_linux.c
src/detection/os/os_nbsd.c
src/detection/packages/packages_obsd.c
src/detection/packages/packages_nbsd.c
src/detection/poweradapter/poweradapter_nosupport.c
src/detection/processes/processes_nbsd.c
src/detection/gtk_qt/qt.c
Expand All @@ -802,7 +802,7 @@ elseif(NetBSD)
src/detection/users/users_linux.c
src/detection/wallpaper/wallpaper_linux.c
src/detection/wifi/wifi_nbsd.c
src/detection/wm/wm_nosupport.c
src/detection/wm/wm_linux.c
src/detection/de/de_linux.c
src/detection/wmtheme/wmtheme_linux.c
src/detection/camera/camera_linux.c
Expand Down Expand Up @@ -884,7 +884,7 @@ elseif(OpenBSD)
src/detection/users/users_obsd.c
src/detection/wallpaper/wallpaper_linux.c
src/detection/wifi/wifi_obsd.c
src/detection/wm/wm_nosupport.c
src/detection/wm/wm_linux.c
src/detection/de/de_linux.c
src/detection/wmtheme/wmtheme_linux.c
src/detection/camera/camera_linux.c
Expand Down Expand Up @@ -1961,12 +1961,17 @@ if(LINUX)
endif()
endif()

find_program(HAVE_RPMBUILD "rpmbuild")
if(HAVE_RPMBUILD)
set(CPACK_GENERATOR "${CPACK_GENERATOR};RPM")
if(NOT IS_MUSL)
find_program(HAVE_RPMBUILD "rpmbuild")
if(HAVE_RPMBUILD)
set(CPACK_GENERATOR "${CPACK_GENERATOR};RPM")

set(CPACK_RPM_PACKAGE_LICENSE "MIT")
set(CPACK_RPM_PACKAGE_LICENSE "MIT")
endif()
endif()
elseif(FreeBSD)
set(CPACK_FREEBSD_PACKAGE_LICENSE "MIT")
set(CPACK_GENERATOR "${CPACK_GENERATOR};FREEBSD")
endif()

set(CPACK_SET_DESTDIR ON)
Expand Down
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
fastfetch (2.44.0) jammy; urgency=medium

* Update to 2.44.0

-- Carter Li <[email protected]> Mon, 26 May 2025 14:59:01 +0800

fastfetch (2.43.0) jammy; urgency=medium

* Update to 2.43.0
Expand Down
2 changes: 1 addition & 1 deletion debian/files
Original file line number Diff line number Diff line change
@@ -1 +1 @@
fastfetch_2.43.0_source.buildinfo universe/utils optional
fastfetch_2.44.0_source.buildinfo universe/utils optional
5 changes: 3 additions & 2 deletions doc/json_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
"type": "string"
},
"biosFormat": {
"description": "Output format of the module `Bios`. See Wiki for formatting syntax\n 1. {date}: Bios date\n 2. {release}: Bios release\n 3. {vendor}: Bios vendor\n 4. {version}: Bios version\n 5. {type}: Firmware type",
"description": "Output format of the module `BIOS`. See Wiki for formatting syntax\n 1. {date}: Bios date\n 2. {release}: Bios release\n 3. {vendor}: Bios vendor\n 4. {version}: Bios version\n 5. {type}: Firmware type",
"type": "string"
},
"bluetoothFormat": {
Expand Down Expand Up @@ -339,7 +339,7 @@
"type": "string"
},
"titleFormat": {
"description": "Output format of the module `Title`. See Wiki for formatting syntax\n 1. {user-name}: User name\n 2. {host-name}: Host name\n 3. {home-dir}: Home directory\n 4. {exe-path}: Executable path of current process\n 5. {user-shell}: User's default shell\n 6. {user-name-colored}: User name (colored)\n 7. {at-symbol-colored}: @ symbol (colored)\n 8. {host-name-colored}: Host name (colored)",
"description": "Output format of the module `Title`. See Wiki for formatting syntax\n 1. {user-name}: User name\n 2. {host-name}: Host name\n 3. {home-dir}: Home directory\n 4. {exe-path}: Executable path of current process\n 5. {user-shell}: User's default shell\n 6. {user-name-colored}: User name (colored)\n 7. {at-symbol-colored}: @ symbol (colored)\n 8. {host-name-colored}: Host name (colored)\n 9. {full-user-name}: Full user name",
"type": "string"
},
"themeFormat": {
Expand Down Expand Up @@ -429,6 +429,7 @@
"file-raw",
"data",
"data-raw",
"command-raw",
"sixel",
"kitty",
"kitty-direct",
Expand Down
2 changes: 1 addition & 1 deletion src/detection/cpu/cpu_windows.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ static const char* detectNCores(FFCPUResult* cpu)
else if (ptr->Relationship == RelationProcessorCore)
++cpu->coresPhysical;
else if (ptr->Relationship == RelationProcessorPackage)
cpu->packages++;
++cpu->packages;
}

return NULL;
Expand Down
27 changes: 19 additions & 8 deletions src/detection/de/de_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,29 @@
#include "util/stringUtils.h"

#include <ctype.h>
#ifdef __FreeBSD__
#include <paths.h>
#ifndef _PATH_LOCALBASE
#define _PATH_LOCALBASE "/usr/local"
#endif
#elif __OpenBSD__
#define _PATH_LOCALBASE "/usr/local"
#elif __NetBSD__
#define _PATH_LOCALBASE "/usr/pkg"
#endif

static void getKDE(FFstrbuf* result, FFDEOptions* options)
{
ffParsePropFileValues(FASTFETCH_TARGET_DIR_USR "/share/wayland-sessions/plasma.desktop", 1, (FFpropquery[]) {
{"X-KDE-PluginInfo-Version =", result}
});
#ifdef _PATH_LOCALBASE
ffParsePropFile(_PATH_LOCALBASE "/share/wayland-sessions/plasma.desktop", "X-KDE-PluginInfo-Version =", result);
if(result->length == 0)
{
ffParsePropFileValues(FASTFETCH_TARGET_DIR_USR "/share/xsessions/plasmax11.desktop", 1, (FFpropquery[]) {
{"X-KDE-PluginInfo-Version =", result}
});
}
ffParsePropFile(_PATH_LOCALBASE "/share/xsessions/plasmax11.desktop", "X-KDE-PluginInfo-Version =", result);
#else
ffParsePropFile(FASTFETCH_TARGET_DIR_USR "/share/wayland-sessions/plasma.desktop", "X-KDE-PluginInfo-Version =", result);
if(result->length == 0)
ffParsePropFile(FASTFETCH_TARGET_DIR_USR "/share/xsessions/plasmax11.desktop", "X-KDE-PluginInfo-Version =", result);
#endif

if(result->length == 0)
ffParsePropFileData("xsessions/plasma.desktop", "X-KDE-PluginInfo-Version =", result);
if(result->length == 0)
Expand Down
12 changes: 6 additions & 6 deletions src/detection/disk/disk_bsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ static const char* detectFsLabel(struct statfs* fs, FFDisk* disk)
return NULL;
}
#else
static const char* detectFsLabel(struct statfs* fs, FFDisk* disk)
static const char* detectFsLabel(FF_MAYBE_UNUSED struct statfs* fs, FF_MAYBE_UNUSED FFDisk* disk)
{
return "Fastfetch was compiled without libgeom support";
}
Expand Down Expand Up @@ -148,7 +148,7 @@ const char* ffDetectDisksImpl(FFDiskOptions* options, FFlist* disks)
if(!ffDiskMatchMountpoint(&options->folders, fs->f_mntonname))
continue;
}
else if(!ffStrEquals(fs->f_mntonname, "/") && !ffStrStartsWith(fs->f_mntfromname, "/dev/") && !ffStrEquals(fs->f_fstypename, "zfs"))
else if(!ffStrEquals(fs->f_mntonname, "/") && !ffStrStartsWith(fs->f_mntfromname, "/dev/") && !ffStrEquals(fs->f_fstypename, "zfs") && !ffStrEquals(fs->f_fstypename, "fusefs.sshfs"))
continue;

#ifdef __FreeBSD__
Expand All @@ -159,13 +159,13 @@ const char* ffDetectDisksImpl(FFDiskOptions* options, FFlist* disks)

FFDisk* disk = ffListAdd(disks);

disk->bytesTotal = (uint64_t)fs->f_blocks * fs->f_bsize;
disk->bytesFree = (uint64_t)fs->f_bfree * fs->f_bsize;
disk->bytesAvailable = (uint64_t)fs->f_bavail * fs->f_bsize;
disk->bytesTotal = (uint64_t)fs->f_blocks * (uint64_t)fs->f_bsize;
disk->bytesFree = (uint64_t)fs->f_bfree * (uint64_t)fs->f_bsize;
disk->bytesAvailable = (uint64_t)fs->f_bavail * (uint64_t)fs->f_bsize;
disk->bytesUsed = 0; // To be filled in ./disk.c

disk->filesTotal = (uint32_t) fs->f_files;
disk->filesUsed = (uint32_t) (fs->f_files - fs->f_ffree);
disk->filesUsed = (uint32_t) fs->f_files - (uint32_t) fs->f_ffree;

ffStrbufInitS(&disk->mountFrom, fs->f_mntfromname);
ffStrbufInitS(&disk->mountpoint, fs->f_mntonname);
Expand Down
4 changes: 4 additions & 0 deletions src/detection/disk/disk_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ static bool isPhysicalDevice(const struct mntent* device)
if(ffStrEquals(device->mnt_type, "zfs"))
return true;

//sshfs
if(ffStrEquals(device->mnt_type, "fuse.sshfs"))
return true;

//Pseudo filesystems don't have a device in /dev
if(!ffStrStartsWith(device->mnt_fsname, "/dev/"))
return false;
Expand Down
14 changes: 12 additions & 2 deletions src/detection/gpu/gpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,34 @@ const char* FF_GPU_VENDOR_NAME_PARALLEL = "Parallel";
const char* FF_GPU_VENDOR_NAME_MICROSOFT = "Microsoft";
const char* FF_GPU_VENDOR_NAME_REDHAT = "RedHat";
const char* FF_GPU_VENDOR_NAME_ORACLE = "Oracle";
const char* FF_GPU_VENDOR_NAME_BROADCOM = "Broadcom";
const char* FF_GPU_VENDOR_NAME_LOONGSON = "Loongson";
const char* FF_GPU_VENDOR_NAME_JINGJIA_MICRO = "Jingjia Micro";
const char* FF_GPU_VENDOR_NAME_HUAWEI = "Huawei";
const char* FF_GPU_VENDOR_NAME_ZHAOXIN = "Zhaoxin";

const char* ffGPUGetVendorString(unsigned vendorId)
{
// https://devicehunt.com/all-pci-vendors
switch (vendorId)
{
case 0x106b: return FF_GPU_VENDOR_NAME_APPLE;
case 0x1002: case 0x1022: return FF_GPU_VENDOR_NAME_AMD;
case 0x1002: case 0x1022: case 0x1dd8: return FF_GPU_VENDOR_NAME_AMD;
case 0x8086: case 0x8087: case 0x03e7: return FF_GPU_VENDOR_NAME_INTEL;
case 0x0955: case 0x10de: case 0x12d2: return FF_GPU_VENDOR_NAME_NVIDIA;
case 0x1ed5: return FF_GPU_VENDOR_NAME_MTHREADS;
case 0x5143: return FF_GPU_VENDOR_NAME_QUALCOMM;
case 0x17cb: case 0x5143: return FF_GPU_VENDOR_NAME_QUALCOMM;
case 0x14c3: return FF_GPU_VENDOR_NAME_MTK;
case 0x15ad: return FF_GPU_VENDOR_NAME_VMWARE;
case 0x1af4: return FF_GPU_VENDOR_NAME_REDHAT;
case 0x1ab8: return FF_GPU_VENDOR_NAME_PARALLEL;
case 0x1414: return FF_GPU_VENDOR_NAME_MICROSOFT;
case 0x108e: return FF_GPU_VENDOR_NAME_ORACLE;
case 0x182f: case 0x14e4: return FF_GPU_VENDOR_NAME_BROADCOM;
case 0x0014: return FF_GPU_VENDOR_NAME_LOONGSON;
case 0x0731: return FF_GPU_VENDOR_NAME_JINGJIA_MICRO;
case 0x19e5: return FF_GPU_VENDOR_NAME_HUAWEI;
case 0x1d17: return FF_GPU_VENDOR_NAME_ZHAOXIN;
default: return NULL;
}
}
Expand Down
3 changes: 0 additions & 3 deletions src/detection/gpu/gpu_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,10 +351,7 @@ static const char* drmDetectIntelSpecific(FFGPUResult* gpu, const char* drmKey,
{
{
struct drm_xe_device_query query = {
.extensions = 0,
.query = DRM_XE_DEVICE_QUERY_GT_TOPOLOGY,
.size = 0,
.data = 0,
};
if (ioctl(fd, DRM_IOCTL_XE_DEVICE_QUERY, &query) >= 0)
{
Expand Down
1 change: 1 addition & 0 deletions src/detection/host/host_android.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const char* ffDetectHost(FFHostResult* host)
|| ffSettingsGetAndroidProperty("ro.vivo.market.name", &host->name)
|| ffSettingsGetAndroidProperty("ro.product.oppo_model", &host->name)
|| ffSettingsGetAndroidProperty("ro.oppo.market.name", &host->name)
|| ffSettingsGetAndroidProperty("ro.vendor.oplus.market.enname", &host->name)
|| ffSettingsGetAndroidProperty("ro.config.devicename", &host->name)
|| ffSettingsGetAndroidProperty("ro.config.marketing_name", &host->name)
|| ffSettingsGetAndroidProperty("ro.product.vendor.model", &host->name)
Expand Down
2 changes: 1 addition & 1 deletion src/detection/host/host_mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ const char* ffHostGetMacProductNameWithHwModel(const FFstrbuf* hwModel)
ffStrEquals(version, "16,5")) return "MacBook Pro (16-inch, 2024, Three Thunderbolt 5 ports)";
if(ffStrEquals(version, "15,14")) return "Mac Studio (M3 Ultra, 2025)";
if(ffStrEquals(version, "15,13")) return "MacBook Air (15-inch, M3, 2024)";
if(ffStrEquals(version, "15,2")) return "MacBook Air (13-inch, M3, 2024)";
if(ffStrEquals(version, "15,12")) return "MacBook Air (13-inch, M3, 2024)";
if(ffStrEquals(version, "15,3")) return "MacBook Pro (14-inch, Nov 2023, Two Thunderbolt / USB 4 ports)";
if(ffStrEquals(version, "15,4")) return "iMac (24-inch, 2023, Two Thunderbolt / USB 4 ports)";
if(ffStrEquals(version, "15,5")) return "iMac (24-inch, 2023, Two Thunderbolt / USB 4 ports, Two USB 3 ports)";
Expand Down
5 changes: 3 additions & 2 deletions src/detection/memory/memory_haiku.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ const char* ffDetectMemory(FFMemoryResult* ram)
if (get_system_info(&info) != B_OK)
return "Error getting system info";

ram->bytesTotal = B_PAGE_SIZE * info.max_pages;
ram->bytesUsed = B_PAGE_SIZE * info.used_pages;
uint32_t pageSize = instance.state.platform.sysinfo.pageSize;
ram->bytesTotal = pageSize * info.max_pages;
ram->bytesUsed = pageSize * info.used_pages;

return NULL;
}
Loading
Loading