mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-26 08:15:59 +03:00
[PR #3682] [MERGED] Kernel.Fs: Device file cleanup and /dev/rng implementation #3654
Labels
No labels
Bloodborne
bug
contributor wanted
documentation
enhancement
frontend
good first issue
help wanted
linux
pull-request
question
release
verification progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/shadPS4#3654
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/shadps4-emu/shadPS4/pull/3682
Author: @StevenMiller123
Created: 10/1/2025
Status: ✅ Merged
Merged: 10/1/2025
Merged by: @squidbus
Base:
main← Head:rng_device📝 Commits (9)
97a1b6cAdd RNG deviceb89286frng device implementation45dfac9Device file function types and log fixups2b5609eUpdated creates4e7587bFix compile32e7068Includes cleanup2b476eeFix buffer size9fc6bdcBring back cstdlib imports850b222Merge branch 'shadps4-emu:main' into rng_device📊 Changes
19 files changed (+371 additions, -245 deletions)
View changed files
📝
CMakeLists.txt(+2 -0)📝
src/core/file_sys/devices/base_device.cpp(+1 -1)📝
src/core/file_sys/devices/base_device.h(+12 -12)📝
src/core/file_sys/devices/console_device.cpp(+26 -27)📝
src/core/file_sys/devices/console_device.h(+14 -14)📝
src/core/file_sys/devices/deci_tty6_device.cpp(+26 -27)📝
src/core/file_sys/devices/deci_tty6_device.h(+14 -14)📝
src/core/file_sys/devices/logger.cpp(+6 -6)📝
src/core/file_sys/devices/logger.h(+5 -5)📝
src/core/file_sys/devices/nop_device.h(+12 -12)📝
src/core/file_sys/devices/random_device.cpp(+27 -27)📝
src/core/file_sys/devices/random_device.h(+14 -14)➕
src/core/file_sys/devices/rng_device.cpp(+87 -0)➕
src/core/file_sys/devices/rng_device.h(+39 -0)📝
src/core/file_sys/devices/srandom_device.cpp(+28 -29)📝
src/core/file_sys/devices/srandom_device.h(+14 -14)📝
src/core/file_sys/devices/urandom_device.cpp(+27 -28)📝
src/core/file_sys/devices/urandom_device.h(+14 -14)📝
src/core/libraries/kernel/file_system.cpp(+3 -1)📄 Description
This PR does two major things, cleaning up various issues with device files, and implementing RngDevice.
For the former, I've adjusted includes to better suit our current code preferences, fixed various incorrect function types, and adjusted the Device Create functions to use similar logic to the Directory Create functions.
For the latter, I've implemented the RngDevice, which is required for libSceSsl2 to run LLE (I have not actually LLE'd the library here, but this fixes internal library issues when trying to run it LLE).
The actual implementation for RngDevice ioctls is based entirely around code from fpPS4, though I've confirmed that libSceSsl2 works with what I've implemented.
I'm open to feedback, especially with my ioctls for the RngDevice, as I'm not too confident in how that code looks.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.