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