Fix drive discovery in Docker — remove sysfs check

This commit is contained in:
Matt Jackson
2026-04-16 22:05:25 +00:00
parent 6e958b0f71
commit 30d59063d5
3 changed files with 6 additions and 6 deletions
+5
View File
@@ -1,5 +1,10 @@
# Changelog # Changelog
## 0.10.6 (2026-04-16)
### Docker compatibility
- **Drive discovery** — removed sysfs check that blocked detection inside Docker containers. Device nodes are sufficient; INQUIRY command validates the device is an optical drive.
## 0.10.5 (2026-04-16) ## 0.10.5 (2026-04-16)
### Audio parser buffering ### Audio parser buffering
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "libfreemkv" name = "libfreemkv"
version = "0.10.5" version = "0.10.6"
edition = "2021" edition = "2021"
rust-version = "1.86" rust-version = "1.86"
license = "AGPL-3.0-only" license = "AGPL-3.0-only"
-5
View File
@@ -10,11 +10,6 @@ pub fn find_drives() -> Vec<(String, DriveId)> {
if !std::path::Path::new(&path).exists() { if !std::path::Path::new(&path).exists() {
continue; continue;
} }
// Skip stale device nodes — sysfs entry must exist
let sysfs = format!("/sys/class/scsi_generic/sg{i}/device/model");
if !std::path::Path::new(&sysfs).exists() {
continue;
}
if let Ok(mut transport) = crate::scsi::open(std::path::Path::new(&path)) { if let Ok(mut transport) = crate::scsi::open(std::path::Path::new(&path)) {
if let Ok(id) = DriveId::from_drive(transport.as_mut()) { if let Ok(id) = DriveId::from_drive(transport.as_mut()) {
if !id.raw_inquiry.is_empty() && (id.raw_inquiry[0] & 0x1F) == 0x05 { if !id.raw_inquiry.is_empty() && (id.raw_inquiry[0] & 0x1F) == 0x05 {