Close device when finished command execution.

This commit is contained in:
2018-09-25 23:42:13 +01:00
parent ccfc48c0c0
commit 2656e27655
4 changed files with 8 additions and 0 deletions

View File

@@ -886,6 +886,8 @@ namespace DiscImageChef.Commands
}
Core.Statistics.AddCommand("device-info");
dev.Close();
}
}
}

View File

@@ -257,6 +257,8 @@ namespace DiscImageChef.Commands
dumpLog.Close();
Core.Statistics.AddCommand("dump-media");
dev.Close();
}
}
}

View File

@@ -451,6 +451,8 @@ namespace DiscImageChef.Commands
DicConsole.WriteLine("Media identified as {0}", scsiInfo.MediaType);
Core.Statistics.AddMedia(scsiInfo.MediaType, true);
dev.Close();
}
}
}

View File

@@ -112,6 +112,8 @@ namespace DiscImageChef.Commands
(long)results.E, (long)results.F, (long)results.Blocks, (long)results.Errored,
(long)(results.Blocks - results.Errored));
Core.Statistics.AddCommand("media-scan");
dev.Close();
}
}
}