Permalink
Browse files

Add an additional check to remove the camcontrol inquiry output if it…

… contains "camcontrol". There was probably an error and it should not be used. (can mess up labels).
  • Loading branch information...
Ken Moore
Ken Moore committed Oct 4, 2013
1 parent 9d437ac commit 8ebea8d6b2a9a27ce8bc5aa623d8f2194a7bf72c
Showing with 1 addition and 0 deletions.
  1. +1 −0 src-qt4/pc-mounttray/devCheck.cpp
@@ -106,6 +106,7 @@ bool DevCheck::devInfo(QString dev, QString* type, QString* label, QString* file
//make sure that it is not a SCSI device
camctl = pcbsd::Utils::runShellCommand( QString("camcontrol inquiry ")+node ).join(" ");
if(camctl.contains(" Fixed Direct Access SCSI")){ detType = "SCSI"; } //USB devices do not have any output
+ if(camctl.contains("camcontrol")){ camctl.clear(); } //error or invalid device type
}
//Make sure we quit before running commands on any invalid device nodes
if(detType.isEmpty() || !QFile::exists(fullDev) ){return FALSE;}

0 comments on commit 8ebea8d

Please sign in to comment.