scsi/linux: fix as_bytes() → as_encoded_bytes() for OsStrExt

- 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
This commit is contained in:
MattJackson
2026-04-28 14:59:55 -07:00
parent e5a90a6567
commit 2f6092a686
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "libfreemkv" name = "libfreemkv"
version = "0.13.32" version = "0.13.33"
edition = "2024" edition = "2024"
rust-version = "1.86" rust-version = "1.86"
license = "AGPL-3.0-only" license = "AGPL-3.0-only"
+1 -1
View File
@@ -386,7 +386,7 @@ impl ScsiTransport for SgIoTransport {
}); });
std::thread::spawn(move || { 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 { let new_fd = unsafe {
libc::open( libc::open(
c_path.as_ptr() as *const libc::c_char, c_path.as_ptr() as *const libc::c_char,