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>
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Release PR for v2.63.0, bundling new platform features (Enlightenment / Haiku / Media progress), Windows refactors (WinRT media + WMI-related removals), and assorted reliability fixes across networking, Wayland protocols, and parsing.
Changes:
- Adds new features: Enlightenment support (incl. optional EET-based config parsing), Haiku wallpaper detection, media playback progress fields/format args, new logos, and additional OS/package detections.
- Refactors Windows implementations (direct WinRT media detection, new WMI header usage, Bluetooth battery detection via CM APIs) and removes Windows-only options (
global.wmiTimeout,battery.useSetupApi). - Improves robustness in parsing/validation (temps JSON ints, option integer bounds), Wayland protocol version binding, and various networking/netif fixes.
Reviewed changes
Copilot reviewed 122 out of 122 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/options/general.h | Makes playerName a general (cross-platform) option; removes Windows-only general option(s). |
| src/options/general.c | Parses/serializes playerName cross-platform; removes wmiTimeout; adjusts init/destroy. |
| src/options/display.c | Improves enum formatting and validates size.ndigits range. |
| src/modules/wifi/wifi.c | Fixes band selection control flow. |
| src/modules/packages/packages.c | Adds cards package manager output/format support. |
| src/modules/packages/option.h | Adds disable-flag bit for cards. |
| src/modules/media/option.h | Adds media percent configuration. |
| src/modules/media/media.c | Adds media progress output/format args and JSON config/result fields. |
| src/modules/datetime/datetime.c | Adds am-pm format arg and refactors formatting block. |
| src/modules/battery/option.h | Removes Windows-only useSetupApi option. |
| src/modules/battery/battery.c | Removes JSON/config/init handling for useSetupApi. |
| src/logo/ascii/xj380.txt | Adds new ASCII logo. |
| src/logo/ascii/ximper.txt | Adds new ASCII logo. |
| src/logo/ascii/openruyi.txt | Adds new ASCII logo. |
| src/logo/ascii/nebios.txt | Adds new ASCII logo. |
| src/logo/ascii/kibaos.txt | Adds new ASCII logo. |
| src/detection/wmtheme/wmtheme_linux.c | Adds Enlightenment WM theme detection path. |
| src/detection/wifi/wifi.h | Improves frequency→channel mapping including 6 GHz and unknown handling. |
| src/detection/wallpaper/wallpaper_haiku.cpp | Adds Haiku wallpaper detection implementation. |
| src/detection/terminalshell/terminalshell_windows.c | Formatting/indent adjustments in registry read code. |
| src/detection/terminalshell/terminalshell.c | Improves Konsole version detection (TDE case). |
| src/detection/sound/sound_windows.cpp | Switches to com.h; initializes COM pointers defensively. |
| src/detection/publicip/publicip.c | Fixes FF_UNINITIALIZED macro spelling and usage. |
| src/detection/packages/packages_linux.c | Adds cards package counting on Linux (NuTyX). |
| src/detection/packages/packages.h | Adds cards field to package result struct. |
| src/detection/os/os_windows.c | Improves Windows “Embedded” variant naming handling. |
| src/detection/os/os_linux.c | Adds Ubuntu flavor detection, Deepin enhancement, Bedrock guard, and misc. cleanup. |
| src/detection/media/media_windows.dll.h | Removes WinRT helper DLL header (no longer used). |
| src/detection/media/media_windows.dll.cpp | Removes WinRT helper DLL implementation (no longer used). |
| src/detection/media/media_windows.cpp | Adds direct WinRT-based media detection implementation. |
| src/detection/media/media_windows.c | Removes old DLL-loading Windows media implementation. |
| src/detection/media/media_linux.c | Adds MPRIS length/position support and ignores playerctld. |
| src/detection/media/media_apple.m | Adds time-based elapsed calculation and emits position/length. |
| src/detection/media/media.h | Adds length and position fields to media result. |
| src/detection/media/media.c | Initializes new media result fields. |
| src/detection/host/host_linux.c | Removes stray whitespace (minor cleanup). |
| src/detection/gtk_qt/gtk.c | Adds NebiDE and Enlightenment GTK settings detection. |
| src/detection/displayserver/linux/wmde.c | Recognizes Enlightenment DE and sets process name/pretty name. |
| src/detection/displayserver/linux/wayland/zwlr-output.c | Uses bounded bind version and hoists listener to static const. |
| src/detection/displayserver/linux/wayland/wayland.h | Adds a min() helper for Wayland version binding. |
| src/detection/displayserver/linux/wayland/kde-output.c | Bounds bind version; hoists order listener. |
| src/detection/displayserver/linux/wayland/kde-output-device-v2-protocol.c | Updates KDE output protocol versions/events. |
| src/detection/displayserver/linux/wayland/kde-output-device-v2-client-protocol.h | Updates client protocol header for new enums/events. |
| src/detection/displayserver/linux/wayland/global-output.c | Bounds bind versions; improves API origin labeling. |
| src/detection/displayserver/displayserver.h | Adds pretty-name constants for NebiDE and Enlightenment. |
| src/detection/de/de_linux.c | Adds Enlightenment DE version detection via DBus/CLI fallback. |
| src/detection/camera/camera_windows.cpp | Switches to com.h; adds Display P3 colorspace handling. |
| src/detection/brightness/brightness_windows.cpp | Removes old C++ implementation (replaced). |
| src/detection/brightness/brightness_windows.c | Adds new C implementation using WMI block APIs + DDC/CI with debug logs. |
| src/detection/bluetoothradio/bluetoothradio_linux.c | Updates DBus integer parsing to 64-bit and casts appropriately. |
| src/detection/bluetooth/bluetooth_windows.cpp | Removes old C++ WMI-based battery detection. |
| src/detection/bluetooth/bluetooth_windows.c | Adds CM API-based Bluetooth battery detection and DEVPROPKEY defines. |
| src/detection/bluetooth/bluetooth_linux.c | Updates DBus unsigned parsing to 64-bit. |
| src/common/windows/wmi.hpp | Removes C++ WMI wrapper header (no longer used). |
| src/common/windows/wmi.h | Adds C declarations for WMI block APIs + cleanup macro. |
| src/common/windows/wmi.cpp | Removes C++ WMI implementation (no longer used). |
| src/common/windows/version.c | Simplifies debug logging around GetFileVersionInfo* errors. |
| src/common/windows/nt.h | Adjusts SharedUserData definition; improves Windows 11 detection logic. |
| src/common/windows/com.hpp | Removes C++-only COM helpers header (replaced). |
| src/common/windows/com.h | Adds cross-C/C++ COM release helper + ffInitCom declaration. |
| src/common/windows/com.cpp | Removes old C++ COM init implementation (replaced). |
| src/common/windows/com.c | Adds new C COM/WinRT init implementation with error mapping. |
| src/common/settings.h | Adds ffEnlightenmentSettings and getter declaration. |
| src/common/impl/temps.c | Validates JSON temp thresholds are ints before parsing. |
| src/common/impl/sysctl.c | Changes sysctl string error handling and adjusts allocation code. |
| src/common/impl/settings.c | Fixes DBus reply unref paths; adds EET-based Enlightenment config reader. |
| src/common/impl/properties.c | Fixes comment typo (“quoted”). |
| src/common/impl/percent.c | Adjusts bar computation placement and handles sentinel -DBL_MAX in numeric output. |
| src/common/impl/path.c | Removes early returns; consolidates return at end. |
| src/common/impl/parsing.c | Adds GTK2/4 combined formatting; removes unused ctype include. |
| src/common/impl/option.c | Adds bounds checks for int/uint parsing and asserts prefix args. |
| src/common/impl/networking_windows.c | Fixes Content-Length parsing offset; reorders validation checks. |
| src/common/impl/networking_linux.c | Fixes Content-Length parsing offset; reorders validation checks. |
| src/common/impl/networking_common.c | Improves gzip error handling and buffer sizing correctness. |
| src/common/impl/netif_windows.c | Queries route tables per-IP-family; improves route selection logic. |
| src/common/impl/netif_haiku.c | Fixes IPv6 raw socket family. |
| src/common/impl/netif_gnu.c | Fixes default-route “no ifName” termination char. |
| src/common/impl/netif_bsd.c | Avoids asserts; adds bounds check on interface name length. |
| src/common/impl/netif_apple.c | Improves route response loop and validates link-layer family/name length. |
| src/common/impl/library.c | Minor preprocessor and cast parenthesis fixes. |
| src/common/impl/jsonconfig.c | Fixes CPUUsage prepare dispatch and condition-property error message. |
| src/common/impl/io_windows.c | Hardens console mode handling; prevents response buffer overflow. |
| src/common/impl/io_unix.c | Uses O_DIRECTORY; ensures correct fd ownership/cleanup. |
| src/common/impl/init.c | Adjusts defaults, fixes sigaction init, and updates feature listing. |
| src/common/impl/format.c | Extends “arg set” logic to uint64 and uses int32_t storage. |
| src/common/impl/font.c | Supports pointsize parsing and avoids empty style list entries. |
| src/common/impl/dbus.c | Improves byte-array string parsing; widens int/uint accessors to 64-bit. |
| src/common/impl/commandoption.c | Returns success/failure for module-type dispatch; emits JSON error objects. |
| src/common/impl/binary_windows.c | Uses strnlen and skips short strings more efficiently. |
| src/common/impl/binary_linux.c | Uses strnlen and skips short strings more efficiently. |
| src/common/impl/binary_apple.c | Skips short strings; removes dead return. |
| src/common/impl/FFstrbuf.c | Fixes memchr bounds and avoids overread in separated matching. |
| src/common/impl/FFlist.c | Adds __restrict to shift/pop output pointer. |
| src/common/impl/FFPlatform_windows.c | Adjusts LSA username freeing comment/calls. |
| src/common/impl/FFPlatform_unix.c | Fixes OpenBSD include/cast for kvm_getfiles. |
| src/common/impl/FFPlatform.c | Initializes platform pageSize. |
| src/common/dbus.h | Updates DBus API signatures to 64-bit int/uint. |
| src/common/apple/smc_temps.c | Removes unused math.h include. |
| src/common/apple/osascript.m | Removes unused framework imports. |
| src/common/apple/cf_helpers.h | Adds helpers for double and date epoch extraction. |
| src/common/apple/cf_helpers.c | Implements new CF helpers and corrects int32 data-length handling. |
| src/common/FFlist.h | Adds __restrict to shift/pop output pointer. |
| src/3rdparty/display-library/repo.json | Updates embedded ADL SDK version string. |
| src/3rdparty/display-library/adl_structures.h | Syncs ADL structures to newer SDK (Windows focus). |
| src/3rdparty/display-library/adl_sdk.h | Bumps ADL SDK version macros; removes Linux __stdcall shim. |
| src/3rdparty/display-library/adl_defines.h | Syncs ADL defines to newer SDK and updates comments/enums. |
| doc/json_schema.json | Updates schema for new/removed options and new module config/format args. |
| CMakeLists.txt | Bumps project version; adds EET option; WinRT detection/linking; adjusts platform sources. |
| CHANGELOG.md | Adds v2.63.0 notes and minor wording fix in v2.62.1 section. |
| .github/workflows/build-omnios-amd64.yml | Makes pkg update non-fatal. |
| .github/workflows/build-no-features-test.yml | Disables EET in “no features” build. |
| .github/workflows/build-linux-vms.yml | Adds EFL dev package for CI images. |
| .github/workflows/build-linux-i686.yml | Adds EFL dev package and libunwind for CI. |
| .github/workflows/build-linux-hosts.yml | Adds EFL dev package and libunwind for CI. |
| .github/workflows/build-linux-armv7l.yml | Adds EFL dev package for CI images. |
| .github/workflows/build-linux-armv6l.yml | Adds EFL dev package for CI images. |
| .github/pull_request_template.md | Adds placeholder “Screenshots” section. |
| .clang-format-ignore | Ignores src/logo/builtin.c. |
| .clang-format | Updates formatting command and adds ObjC-specific settings. |
Comments suppressed due to low confidence (9)
src/common/impl/sysctl.c:1
- The NULL-check after
malloc(*resultLength)was removed. If allocation fails,sysctl()will be called with a NULL buffer, which can lead to incorrect behavior or a crash depending on platform/libc. Restore an explicitif (data == NULL) return NULL;before callingsysctl().
src/detection/displayserver/linux/wayland/wayland.h:1 - Defining a generic
minsymbol in a public header is prone to collisions (e.g., withminmacros from other headers or other translation units). Prefer a project-prefixed helper (e.g.,ffMinU32) or a shared macro/util already used elsewhere to avoid namespace pollution.
src/detection/wallpaper/wallpaper_haiku.cpp:1 - Creating a
BApplicationinsideffDetectWallpapercan have process-wide side effects on Haiku (only one app object/globalbe_app, thread initialization, etc.), and it may fail or behave unexpectedly if the function is called more than once or if aBApplicationalready exists. Consider reusing an existingbe_app(if present) or moving app initialization to a single, higher-level startup path. Also,malloc(ai.size)is not checked for failure before use; add an allocation failure check to avoid dereferencing NULL.
src/detection/wallpaper/wallpaper_haiku.cpp:1 - Creating a
BApplicationinsideffDetectWallpapercan have process-wide side effects on Haiku (only one app object/globalbe_app, thread initialization, etc.), and it may fail or behave unexpectedly if the function is called more than once or if aBApplicationalready exists. Consider reusing an existingbe_app(if present) or moving app initialization to a single, higher-level startup path. Also,malloc(ai.size)is not checked for failure before use; add an allocation failure check to avoid dereferencing NULL.
src/common/impl/settings.c:1 - The EET path initializes the library with
eet_init()but never calls the corresponding shutdown (eet_shutdown()), which can leak global resources or keep refcounts elevated. Additionally,eet_data_read()typically allocatesparsed; it is not freed here, causing a leak. A robust fix is to copy the needed strings/values into caller-owned storage (or immediately intoFFstrbufs) and then freeparsed, and calleet_shutdown()before returning (including failure paths).
src/common/impl/settings.c:1 - The EET path initializes the library with
eet_init()but never calls the corresponding shutdown (eet_shutdown()), which can leak global resources or keep refcounts elevated. Additionally,eet_data_read()typically allocatesparsed; it is not freed here, causing a leak. A robust fix is to copy the needed strings/values into caller-owned storage (or immediately intoFFstrbufs) and then freeparsed, and calleet_shutdown()before returning (including failure paths).
src/common/impl/settings.c:1 - The EET path initializes the library with
eet_init()but never calls the corresponding shutdown (eet_shutdown()), which can leak global resources or keep refcounts elevated. Additionally,eet_data_read()typically allocatesparsed; it is not freed here, causing a leak. A robust fix is to copy the needed strings/values into caller-owned storage (or immediately intoFFstrbufs) and then freeparsed, and calleet_shutdown()before returning (including failure paths).
src/detection/media/media_windows.cpp:1 - This polling loop uses
ffTimeSleep(0)while waiting for async completion, which can result in a tight spin and unnecessary CPU usage under load or slow WinRT operations. Consider a small sleep/backoff (e.g., 1–10ms) or using an event/callback-based wait mechanism if available for the ABI type, to reduce busy-wait overhead.
src/detection/media/media_windows.cpp:1 - This polling loop uses
ffTimeSleep(0)while waiting for async completion, which can result in a tight spin and unnecessary CPU usage under load or slow WinRT operations. Consider a small sleep/backoff (e.g., 1–10ms) or using an event/callback-based wait mechanism if available for the ABI type, to reduce busy-wait overhead.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 122 out of 122 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (5)
src/common/impl/sysctl.c:1
malloc(*resultLength)is no longer checked for NULL before being passed tosysctl(). If allocation fails, this will invokesysctl()with a NULL buffer and can crash. Please restore a NULL check (returning NULL early) before callingsysctl().
src/common/windows/wmi.h:1NTSYSAPI/NTAPIare used in this header but the file does not include a header that guarantees these macros are defined (e.g.,<winternl.h>). Sincebrightness_windows.cincludescommon/windows/wmi.hbefore<winternl.h>, this can become a compile error. Consider including<winternl.h>(or another header that definesNTSYSAPI/NTAPI) directly inwmi.h, or avoid these macros in the declaration.
src/detection/displayserver/linux/wayland/wayland.h:1- Defining a generic
minsymbol in a shared header is prone to collisions with commonminmacros/functions from other headers and can cause subtle compile issues. Prefer a project-scoped name (e.g.,ffMinU32) or a macro guarded to avoid conflicts.
src/detection/media/media_windows.cpp:1 - This loop polls
IAsyncInfo::get_Status()withffTimeSleep(0), which can still produce high wakeup rates/CPU usage when the async op takes noticeable time. Consider adding a small backoff (e.g., increasing sleep up to a cap) or using a more event-driven wait mechanism if available, to reduce CPU churn without delaying completion materially.
src/detection/de/de_linux.c:1 resultis annotatedFF_A_UNUSEDbut is used throughout the function. This makes the attribute misleading and can hide real unused-parameter warnings later. Please removeFF_A_UNUSEDfrom this parameter (or, if it should be unused, stop writing to it).
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