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:
+1
-1
@@ -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
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user