Conversation
... and improve performance slightly
* Packages:add cards counting (NuTyX) * package.c no need to add counts.catds * Sort packages print alphabetically * ditto * ditto * packages.c update FF_ARG and ffpackagesModule.info --------- Co-authored-by: Carter Li <CarterLi@users.noreply.github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Noop, because the whole platform is statically initialized Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: or sim <you@example.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
* Wallpaper (Haiku): Add support * Refactor wallpaper detection logic and memory handling --------- Co-authored-by: Carter Li <CarterLi@users.noreply.github.com>
* Logo: Add openRuyi * Update ASCII art in openruyi.txt * Fix casing of 'openRuyi' in builtin.c --------- Co-authored-by: Z572 <z572@z572.online> Co-authored-by: Carter Li <CarterLi@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Release bump to v2.63.0, bundling a broad set of platform detection improvements (notably Linux Wi-Fi via netlink, Windows battery/media refactors, Wayland protocol compatibility updates), plus new logos and assorted reliability fixes across common utilities.
Changes:
- Refactors platform detection: Linux Wi-Fi switches to nl80211 netlink; Windows battery detection moves to WMI data blocks; Windows media detection is integrated (WinRT headers gated at build time).
- Updates Wayland displayserver bindings to handle newer protocol versions more safely, and adds Haiku wallpaper detection.
- Adds/adjusts package counting, OS flavor detection, parsing/validation hardening, and new builtin logos.
Reviewed changes
Copilot reviewed 95 out of 95 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/options/display.c | Formats enum parsing; validates ndigits range on CLI. |
| src/modules/wifi/wifi.c | Fixes band selection logic (avoid overwriting 60 GHz). |
| src/modules/packages/packages.c | Adds cards package manager reporting throughout module output/JSON. |
| src/modules/packages/option.h | Adds disable flag bit for cards. |
| src/modules/battery/option.h | Removes Windows-only useSetupApi option from battery options. |
| src/modules/battery/battery.c | Removes JSON parsing/config emission for useSetupApi. |
| src/logo/builtin.c | Adds/adjusts builtin logos (GNOME OS name match, new KibaOS/NebiOS/openRuyi/XJ380, removals/format tweaks). |
| src/logo/ascii/xj380.txt | Adds XJ380 ASCII logo. |
| src/logo/ascii/openruyi.txt | Adds openRuyi ASCII logo. |
| src/logo/ascii/nebios.txt | Adds NebiOS ASCII logo. |
| src/logo/ascii/kibaos.txt | Adds KibaOS ASCII logo. |
| src/detection/wifi/wifi.h | Improves frequency→channel mapping (2.4/5/6 GHz + special cases). |
| src/detection/wifi/wifi_linux.c | Replaces Linux Wi-Fi detection approach with nl80211 netlink + ioctl fallback and richer parsing. |
| src/detection/wallpaper/wallpaper_haiku.cpp | Implements Haiku wallpaper path detection. |
| src/detection/terminalshell/terminalshell.c | Adjusts Konsole version detection for likely TDE Konsole (#2319). |
| src/detection/terminalshell/terminalshell_windows.c | Minor formatting/indent fixes in registry read block. |
| src/detection/sound/sound_windows.cpp | Switches to new COM helper header; initializes COM pointers explicitly. |
| src/detection/publicip/publicip.c | Fixes typo in sentinel macro name (FF_UNINITIALIZED). |
| src/detection/packages/packages.h | Adds cards field to package result struct. |
| src/detection/packages/packages_linux.c | Implements cards counting for NuTyX. |
| src/detection/os/os_linux.c | Adds Ubuntu Kylin/Unity detection; improves Deepin version; adjusts Bedrock helper attributes. |
| src/detection/media/media_windows.dll.h | Removes separate WinRT media DLL interface header. |
| src/detection/media/media_windows.dll.cpp | Removes separate WinRT media DLL implementation. |
| src/detection/media/media_windows.cpp | Adds integrated Windows media detection (WinRT-gated) + thumbnail saving. |
| src/detection/media/media_windows.c | Removes old dynamic DLL loader for WinRT media. |
| src/detection/host/host_linux.c | Minor whitespace cleanup. |
| src/detection/gtk_qt/gtk.c | Treats NebiDE as GNOME-settings-based theme source. |
| src/detection/displayserver/linux/wayland/zwlr-output.c | Makes listener static; caps bind version. |
| src/detection/displayserver/linux/wayland/wayland.h | Adds local min() helper for bind-version capping. |
| src/detection/displayserver/linux/wayland/kde-output.c | Caps bind versions; listener adjustments; makes order listener static. |
| src/detection/displayserver/linux/wayland/kde-output-device-v2-protocol.c | Updates protocol version/event counts for newer kde-output-device-v2. |
| src/detection/displayserver/linux/wayland/kde-output-device-v2-client-protocol.h | Syncs client protocol header with newer events/capabilities and doc fixes. |
| src/detection/displayserver/linux/wayland/global-output.c | Caps wl_output/zxdg bind versions; annotates API used. |
| src/detection/displayserver/displayserver.h | Adds NebiDE DE pretty-name constant. |
| src/detection/camera/camera_windows.cpp | Uses new COM helper header; adds Display P3 colorspace enum handling. |
| src/detection/brightness/brightness_windows.cpp | Removes C++ WMI-based brightness implementation. |
| src/detection/brightness/brightness_windows.c | Adds C implementation using WMI data blocks + DDC/CI fallback with extra debug logging. |
| src/detection/bluetooth/bluetooth_windows.cpp | Removes C++ WMI-based Bluetooth battery implementation. |
| src/detection/bluetooth/bluetooth_windows.c | Adds C implementation using CM device properties for Bluetooth battery level. |
| src/detection/battery/battery_windows.c | Refactors Windows battery detection to WMI data blocks + NT API (removes old CM/SetupAPI toggle). |
| src/common/windows/wmi.hpp | Removes C++ WMI wrapper. |
| src/common/windows/wmi.h | Adds C declarations/helpers for WMI data block APIs. |
| src/common/windows/wmi.cpp | Removes C++ WMI implementation. |
| src/common/windows/version.c | Simplifies Win32 error logging. |
| src/common/windows/nt.h | Fixes SharedUserData access for aarch64; improves Win11 detection. |
| src/common/windows/com.hpp | Removes C++ COM helper header. |
| src/common/windows/com.h | Adds C/C++ compatible COM helper header + cleanup macro. |
| src/common/windows/com.cpp | Removes C++ COM init implementation. |
| src/common/windows/com.c | Adds C COM/WinRT init implementation (RoInitialize/CoInitializeEx). |
| src/common/impl/temps.c | Validates JSON temp thresholds are integers before parsing. |
| src/common/impl/sysctl.c | Fixes sysctl error handling; minor cleanup. |
| src/common/impl/settings.c | Fixes DBus reply unref leaks in XFConf getters. |
| src/common/impl/properties.c | Fixes typo (“quoted”). |
| src/common/impl/percent.c | Avoids formatting sentinel (-DBL_MAX) as a number; moves bar calc into colored path. |
| src/common/impl/path.c | Simplifies Windows frealpath return flow. |
| src/common/impl/parsing.c | Extends GTK combination logic to handle GTK2+GTK4 case. |
| src/common/impl/option.c | Hardens numeric parsing (range checks) and asserts prefix args non-null. |
| src/common/impl/networking_windows.c | Fixes Content-Length offset; reorganizes validity checks and mismatch handling. |
| src/common/impl/networking_linux.c | Same Content-Length offset + validation reorder as Windows. |
| src/common/impl/networking_common.c | Improves gzip decompression correctness and buffer sizing. |
| src/common/impl/netif_windows.c | Uses AF_INET/AF_INET6 routing tables; improves default route selection. |
| src/common/impl/netif_haiku.c | Fixes IPv6 route socket family. |
| src/common/impl/netif_gnu.c | Fixes NUL-termination when no interface found. |
| src/common/impl/netif_bsd.c | Replaces assert with bounds check for interface name length. |
| src/common/impl/netif_apple.c | Improves route response matching and adds bounds checks. |
| src/common/impl/library.c | Minor preprocessor/parentheses fixes in Windows dl* implementation. |
| src/common/impl/jsonconfig.c | Fixes CPUUsage prepare routing; corrects “condition” property error text. |
| src/common/impl/io_windows.c | Improves console mode handling and avoids terminal response buffer overflow. |
| src/common/impl/io_unix.c | Switches directory traversal to O_DIRECTORY + auto-close DIR. |
| src/common/impl/init.c | Adjusts default cursor/linewrap behavior; improves sigaction initialization; updates feature list. |
| src/common/impl/format.c | Fixes FF_ARG_TYPE_INT handling and adds FF_ARG_TYPE_UINT64. |
| src/common/impl/font.c | Improves Xft parsing (pointsize) and avoids storing empty styles. |
| src/common/impl/FFstrbuf.c | Fixes separator matching bounds and avoids over-reads. |
| src/common/impl/FFPlatform.c | Initializes pageSize before platform init. |
| src/common/impl/FFPlatform_windows.c | Documents correct free sequence for LSA username. |
| src/common/impl/FFPlatform_unix.c | Adds missing includes; fixes pid type cast on OpenBSD. |
| src/common/impl/FFlist.c | Adds __restrict for shift/pop out params. |
| src/common/impl/dbus.c | Fixes byte-array string extraction; hardens UINT→INT conversion. |
| src/common/impl/commandoption.c | Returns structured JSON error for unknown module types. |
| src/common/impl/binary_windows.c | Uses bounded strnlen when scanning PE sections. |
| src/common/impl/binary_linux.c | Uses bounded strnlen when scanning ELF sections. |
| src/common/impl/binary_apple.c | Skips short strings properly; minor cleanup. |
| src/common/FFlist.h | Mirrors __restrict signature changes for shift/pop. |
| src/common/apple/smc_temps.c | Removes unused math include. |
| src/common/apple/osascript.m | Removes unused Apple framework imports. |
| src/common/apple/cf_helpers.c | Fixes CFData int size assumptions for int32_t. |
| src/3rdparty/display-library/repo.json | Updates embedded ADL SDK version metadata to 18.1. |
| src/3rdparty/display-library/adl_structures.h | Updates/adjusts ADL structures for newer Windows-focused SDK. |
| src/3rdparty/display-library/adl_sdk.h | Bumps ADL SDK version macros; removes Linux __stdcall shim. |
| src/3rdparty/display-library/adl_defines.h | Updates ADL defines/enums for newer SDK; doc adjustments. |
| doc/json_schema.json | Removes useSetupApi from battery JSON schema. |
| CMakeLists.txt | Windows: C++20, WinRT header detection, link/runtime defs changes; replaces WinRT DLL build with integrated path; enables Haiku wallpaper source. |
| CHANGELOG.md | Adds 2.63.0 release notes. |
| .github/workflows/build-omnios-amd64.yml | Makes pkg update non-fatal for OmniOS CI. |
| .github/pull_request_template.md | Adds screenshots section to PR template. |
Comment on lines
+309
to
+325
| if (pos + 2 > len) { | ||
| return; | ||
| } | ||
| uint16_t pairwiseCount = *(uint16_t*) (ie + pos); | ||
| pos += 2; | ||
|
|
||
| size_t pairwiseLen = (size_t) pairwiseCount * 4; | ||
| if (pos + pairwiseLen > len) { | ||
| return; | ||
| } | ||
| pos += pairwiseLen; | ||
|
|
||
| if (pos + 2 > len) { | ||
| return; | ||
| } | ||
| uint16_t akmCount = *(uint16_t*) (ie + pos); | ||
| pos += 2; |
Comment on lines
+378
to
+388
| if (pos + 2 > len) { | ||
| return; | ||
| } | ||
| uint16_t pairwiseCount = *(uint16_t*) (ie + pos); | ||
| pos += 2 + (size_t) pairwiseCount * 4; | ||
|
|
||
| if (pos + 2 > len) { | ||
| return; | ||
| } | ||
| uint16_t akmCount = *(uint16_t*) (ie + pos); | ||
| pos += 2; |
Fk `clang-format`
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 108 out of 108 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (8)
src/common/impl/sysctl.c:1
- The
malloc(*resultLength)NULL-check was removed. If allocation fails,sysctl()will be called with a NULL buffer and can crash. Restore an explicitif (!data) return NULL;(or equivalent error path) before callingsysctl().
src/detection/de/de_linux.c:1 ffDBusGetString()returns a boolean success value; this condition treats success as failure and will incorrectly return an error while also leavingresultpopulated. Flip the condition to fail only whenffDBusGetString(...)returns false.
src/detection/media/media_windows.cpp:1getMedia()returnsNULLon success, butffStrbufAppendS(&media->error, error)is still called unconditionally. IfffStrbufAppendSdoesn't accept NULL (common for string append APIs), this can crash. Guard the append (if (error) ...) or changegetMedia()to return an empty string on success.
src/common/impl/settings.c:1- This function assigns raw
char*pointers from theE_Config* parsedobject intoffEnlightenmentSettings, butparsedis never freed and ownership/lifetime are unclear. This risks either a leak (current behavior) or a future use-after-free ifparsedis ever freed. Consider copying these strings into caller-owned buffers (e.g.,FFstrbuf) or documenting/adding a matching destroy/free API forffEnlightenmentSettingsthat frees the underlying EET-allocated data.
src/common/impl/settings.c:1 - This function assigns raw
char*pointers from theE_Config* parsedobject intoffEnlightenmentSettings, butparsedis never freed and ownership/lifetime are unclear. This risks either a leak (current behavior) or a future use-after-free ifparsedis ever freed. Consider copying these strings into caller-owned buffers (e.g.,FFstrbuf) or documenting/adding a matching destroy/free API forffEnlightenmentSettingsthat frees the underlying EET-allocated data.
src/detection/displayserver/linux/wayland/wayland.h:1 - Defining a global
minsymbol in a public header is prone to name collisions (macros from other headers, C++std::min, etc.). Rename this helper to a project-scoped name (e.g.,ffMinU32) or use an existing project macro/util if available.
src/detection/media/media_windows.cpp:1 - This waits for WinRT async completion via a polling loop with
ffTimeSleep(0), which can still cause unnecessary CPU wakeups/spin depending on scheduler behavior and how oftenget_Statusis polled. Prefer an event-based wait (where possible) or add a small backoff (e.g., sleep a few ms) to reduce CPU usage while waiting.
src/detection/media/media_windows.cpp:1 - This waits for WinRT async completion via a polling loop with
ffTimeSleep(0), which can still cause unnecessary CPU wakeups/spin depending on scheduler behavior and how oftenget_Statusis polled. Prefer an event-based wait (where possible) or add a small backoff (e.g., sleep a few ms) to reduce CPU usage while waiting.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist