Navigation Menu

Skip to content
This repository has been archived by the owner on Dec 4, 2020. It is now read-only.

Commit

Permalink
Add an additional check to remove the camcontrol inquiry output if it…
Browse files Browse the repository at this point in the history
… contains "camcontrol". There was probably an error and it should not be used. (can mess up labels).
  • Loading branch information
Ken Moore committed Oct 4, 2013
1 parent 9d437ac commit 8ebea8d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src-qt4/pc-mounttray/devCheck.cpp
Expand Up @@ -106,6 +106,7 @@ bool DevCheck::devInfo(QString dev, QString* type, QString* label, QString* file
//make sure that it is not a SCSI device //make sure that it is not a SCSI device
camctl = pcbsd::Utils::runShellCommand( QString("camcontrol inquiry ")+node ).join(" "); 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(" 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 //Make sure we quit before running commands on any invalid device nodes
if(detType.isEmpty() || !QFile::exists(fullDev) ){return FALSE;} if(detType.isEmpty() || !QFile::exists(fullDev) ){return FALSE;}
Expand Down

0 comments on commit 8ebea8d

Please sign in to comment.