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:
2026-04-28 14:59:55 -07:00
parent 94664a0398
commit 892a972d7d
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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"
+1 -1
View File
@@ -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,