feat(libc): implement setlogmask #3542
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3542"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by BharatYadav007 on 2026-10-11T12:52:44Z.
What
Add the missing libc
setlogmaskexport and apply its process-wide mask tosyslogandvsyslogbefore formatting. Zero queries the mask; a nonzero argument replaces it and returns the previous mask. The default is0xff. Filtering uses severity independently of facility and also applies to the unknown-priority diagnostic.Behaviour follows FreeBSD 11 syslog.c. Update TechnicalDebt to record that console mask behaviour remains unverified. This implements a logging control explicitly left out of #1729.
Rebased onto upstream main at
1e8fff68c. Checked all 132 open PR heads for overlap; none implements this change.Tested
Windows, WinLibs MinGW-w64 GCC 15.2.0, Release, BUILD_TESTING=ON.
guest_syslogpassed on the rebased branch in 0.10 s. Covers queries and previous masks, all severities, facilities, high/negative masks, suppressed%n, diagnostic filtering, errno preservation, and state shared across threads.libstarget passed before rebasing; the build of the refreshed branch is currently running.guest_kernel_sysrun failed because the host reports symlink support as unimplemented; no kernel filesystem code is changed by this PR.Checklist
main; no other open PR implements the same functions.mdfiles or images added to the repositoryImported from boykopovar/AnyPS5. Originally posted by copilot-pull-request-reviewer[bot] on 2026-10-11T12:54:34Z.
Review: COMMENTED
🟢 Approval recommended
The implementation matches the documented behavior and is covered by focused tests.
0 open findings
What changed in this PR
Implements process-wide libc
setlogmaskbehavior and applies severity filtering to syslog output.Changes:
core/libs/prx/libc/src/Syslog.cppcore/libs/tests/GuestSyslog.cppdocs/dev/TechnicalDebt.md🧠 Review effort: Balanced
💡 Add a
code-reviewagent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T13:20:07Z.
Progress report (
a11c8f7→8355b1f)📈 System libraries: 85.82% (+0.01%, +1 implemented functions)
✅ 1 implemented
setlogmask_nid_postfixImported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T21:32:13Z.
Checked build + ctest on Linux (
guest_syslogpasses, and doesn't link without the change),setlogmasksemantics and the mask check order against FreeBSDlib/libc/gen/syslog.c, and the TechnicalDebt line; merging.