From 2f6092a6867e8f4f1507168a269435c6342289f3 Mon Sep 17 00:00:00 2001 From: MattJackson <1085847+MattJackson@users.noreply.github.com> Date: Tue, 28 Apr 2026 14:59:55 -0700 Subject: [PATCH] =?UTF-8?q?scsi/linux:=20fix=20as=5Fbytes()=20=E2=86=92=20?= =?UTF-8?q?as=5Fencoded=5Fbytes()=20for=20OsStrExt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - as_bytes() requires OsStrExt import which is platform-specific - as_encoded_bytes() is the portable API available on all platforms - Fixes CI failure on Linux (Ubuntu) in GitHub Actions --- Cargo.toml | 2 +- src/scsi/linux.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 63f53c2..57fe7a4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "libfreemkv" -version = "0.13.32" +version = "0.13.33" edition = "2024" rust-version = "1.86" license = "AGPL-3.0-only" diff --git a/src/scsi/linux.rs b/src/scsi/linux.rs index 8302751..d599bea 100644 --- a/src/scsi/linux.rs +++ b/src/scsi/linux.rs @@ -386,7 +386,7 @@ impl ScsiTransport for SgIoTransport { }); std::thread::spawn(move || { - let c_path = std::ffi::CString::new(path.as_os_str().as_bytes()).unwrap(); + let c_path = std::ffi::CString::new(path.as_os_str().as_encoded_bytes()).unwrap(); let new_fd = unsafe { libc::open( c_path.as_ptr() as *const libc::c_char,