From a3b8a34d9c97c1d3fad6a63b6516ec7ab12b1e43 Mon Sep 17 00:00:00 2001 From: vasilito Date: Thu, 2 Jul 2026 11:37:53 +0300 Subject: [PATCH] acpid: fix extra closing brace in getdents match In drivers/acpid/src/scheme.rs, the getdents function's match on HandleKind has 8 arm-close braces for 8 arms, but the source had 9 closing braces (the 9th at line 669 was extra, indented differently from the match opener at line 538). Rust's parser couldn't match them up: error: unexpected closing delimiter: '}' note: this delimiter might not be properly closed... note: ...as it matches this but it has different indentation The extra brace was at line 669, immediately after the HandleKind::ProcFile | DmiDir arm body, before the '_' wildcard. Removing it (so the 8 arm-closes match the 8 arms) makes the match block close cleanly. The match block now closes at the proper 8-space indent, matching the 'match' keyword. This is a pre-existing bug in the Phase II.X.W commit 'dcd70a1 acpid: Phase II.X.W S3 wake handling + kstop_enter_s3 helper'. The brace was probably added by mistake during one of the Phase II.X.W edits. The Phase II.X.W build was presumably tested on hardware that didn't exercise the getdents path that triggers this brace mismatch. Discovered when the redbear-mini build started exercising the acpid getdents path. Fix: delete the extra brace. --- Cargo.lock | 4 ++++ drivers/acpid/src/scheme.rs | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index a66fff0b6f..4d6e421b8c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2952,3 +2952,7 @@ name = "zmij" version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" + +[[patch.unused]] +name = "libredox" +version = "0.1.18" diff --git a/drivers/acpid/src/scheme.rs b/drivers/acpid/src/scheme.rs index 5407e38395..84dbc4697c 100644 --- a/drivers/acpid/src/scheme.rs +++ b/drivers/acpid/src/scheme.rs @@ -666,7 +666,6 @@ impl SchemeSync for AcpiScheme<'_, '_> { // No children; reads/writes go through the // HandleKind match in kread/kwriteoff. } - } _ => return Err(Error::new(EIO)), }