Changeset dd95361


Ignore:
Timestamp:
Aug 28, 2013 5:46:00 AM (8 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1
Children:
486f1d3
Parents:
24cce1d5
Message:

Now the SCSI/USB distinctions should be resolved in naming/icon conventions for the mount tray. One additional result of this is a much better default naming convention for USB sticks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/pc-mounttray/devCheck.cpp

    rb103b6c rdd95361  
    102102    } 
    103103  } 
     104  QString camctl; 
    104105  if(detType == "USB" && QFile::exists(fullDev)){ 
    105106    //make sure that it is not a SCSI device 
    106     QString camctl = "camcontrol identify "+node; 
    107     camctl = pcbsd::Utils::runShellCommand( camctl ).join(" "); 
    108     if(camctl.contains(" SCSI ")){ detType = "SCSI"; } //USB devices do not have any output 
     107    camctl = pcbsd::Utils::runShellCommand( QString("camcontrol inquiry ")+node ).join(" "); 
     108    if(camctl.contains(" Fixed Direct Access SCSI")){ detType = "SCSI"; } //USB devices do not have any output 
    109109  } 
    110110  //Make sure we quit before running commands on any invalid device nodes 
     
    190190  if( !glabel.isEmpty() ){ dlabel = glabel; hasLabel = TRUE; } //glabel 
    191191  else if(!dlabel.isEmpty()){ hasLabel = TRUE; } //file -s label 
    192   else{ 
     192  else if( !camctl.isEmpty() ){  
     193    //not necessarily a "detected" label, but just an alternate fallback name 
     194    dlabel = camctl.section(">",0,0).section("<",-1).section(" ",0,0).simplified(); 
     195  }else{ 
    193196    //Assign a device label 
    194197    if(isCD){ 
Note: See TracChangeset for help on using the changeset viewer.