Files
RedBear-OS/local/patches/kernel/P10-debug-scheme-serial-fix.patch
T
vasilito 11993af01f fix: rebase base patches, commit recipe drift, add relibc rlimit/sysconf
Base: fix P6-driver-new-modules.patch (ed format -> unified diff) for new
driver modules (ncq, itr, phy). P6-driver-main-fixes.patch now applies with
offset on current upstream source.

Relibc: remove stale P5-named-semaphores (upstream has stubs), add
P10-stack-size-8mb and P11-getrlimit-getrusage (per-process rlimit table,
sysconf integration, getdtablesize fix, null-pointer safety).

Kernel: consolidate 29 individual patches into single redbear-consolidated.patch.

Userutils: P5-redbear-branding replaces P4-login-rate-limit.

Recipe.toml changes now committed so they survive source resets.
2026-05-04 11:49:15 +01:00

35 lines
1.1 KiB
Diff

--- a/src/scheme/debug.rs 2026-04-28 07:21:41.000000000 +0100
+++ b/src/scheme/debug.rs 2026-05-04 08:10:23.688174541 +0100
@@ -22,9 +22,10 @@
static HANDLES: RwLock<L1, HandleMap<Handle>> = RwLock::new(HandleMap::new());
-/// Add to the input queue
+/// Add to the input queue, translating CR to NL (ICRNL) for serial console compatibility.
pub fn debug_input(data: u8, token: &mut CleanLockToken) {
- INPUT.send(data, token);
+ let translated = if data == b'\r' { b'\n' } else { data };
+ INPUT.send(translated, token);
}
// Notify readers of input updates
@@ -106,12 +107,16 @@
fn fevent(
&self,
id: usize,
- _flags: EventFlags,
+ flags: EventFlags,
token: &mut CleanLockToken,
) -> Result<EventFlags> {
let _handle = *HANDLES.read(token.token()).get(id)?;
- Ok(EventFlags::empty())
+ let mut ready = EventFlags::empty();
+ if flags.contains(EventFlags::EVENT_READ) {
+ ready |= EventFlags::EVENT_READ;
+ }
+ Ok(ready)
}
fn fsync(&self, id: usize, token: &mut CleanLockToken) -> Result<()> {