fix device_scan when opening a regular file

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2025-10-19 12:02:30 -04:00
parent 0da097dcb2
commit c663f210ca

View File

@ -137,9 +137,6 @@ fn devs_str_sbs_from_device(
if metadata.is_dir() { if metadata.is_dir() {
return Err(anyhow::anyhow!("'{}' is a directory, not a block device", device.display())); return Err(anyhow::anyhow!("'{}' is a directory, not a block device", device.display()));
} }
if metadata.is_file() {
return Err(anyhow::anyhow!("'{}' is a regular file, not a block device", device.display()));
}
} }
let dev_sb = read_super_silent(device, *opts)?; let dev_sb = read_super_silent(device, *opts)?;