Skip to content

Commit

Permalink
Filter out more devices we dont care about
Browse files Browse the repository at this point in the history
  • Loading branch information
cholcombe973 committed Sep 19, 2017
1 parent 9340cae commit 53c0ab9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions src/test_disk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,12 @@ pub fn check_all_disks() -> Result<Vec<Result<Status>>> {
let device_info: Vec<Device> = block_utils::get_all_device_info(devices.as_slice())
.map_err(|e| Error::new(ErrorKind::Other, e))?
.into_iter()
// Get rid of loopback devices
.filter(|d| !(d.media_type == MediaType::Loopback))
// Get rid of lvm devices
.filter(|d| !(d.media_type == MediaType::LVM))
// Get rid of ram devices
.filter(|d| !(d.media_type == MediaType::Ram))
.collect();

for device in device_info {
Expand Down

0 comments on commit 53c0ab9

Please sign in to comment.