Changeset 51525dc


Ignore:
Timestamp:
02/10/15 07:59:35 (7 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, enter/10, releng/10.1.2, releng/10.2
Children:
148314d
Parents:
63ebfaf
Message:

Ensure that personacrpyt devices are not listed as available removable devices in pc-sysconfig.

Location:
src-sh/pcbsd-utils/pc-sysconfig/daemon
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src-sh/pcbsd-utils/pc-sysconfig/daemon/Backend-remdev.cpp

    r1955df2 r51525dc  
    144144  QStringList badlist = DEVDB::invalidDeviceList(); 
    145145  badlist << getSwapDevices(); 
     146  badlist << getPersonaCryptDevices(); 
    146147  QDir devDir("/dev"); 
    147148  QStringList subdevs = devDir.entryList(DEVDB::deviceFilter(), QDir::NoDotAndDotDot | QDir::NoSymLinks | QDir::System, QDir::NoSort); 
     
    454455} 
    455456 
     457QStringList Backend::getPersonaCryptDevices(){ 
     458  QStringList info = runShellCommand("personacrypt list -r"); 
     459  QStringList devs; 
     460  for(int i=0; i<info.length(); i++){ 
     461    if(info[i].contains(":") && QFile::exists("/dev/"+info[i].section(":",0,0)) ){ 
     462      devs << info[i].section(":",0,0); 
     463    } 
     464  } 
     465  return devs; 
     466} 
     467 
    456468QString Backend::mountRemDev(QString node, QString mntdir, QString fs){ 
    457469  //See if we need to probe the device here and adjust inputs 
  • src-sh/pcbsd-utils/pc-sysconfig/daemon/Backend.h

    r5b402f8 r51525dc  
    123123        QStringList getUsableFileSystems(); 
    124124        QStringList getSwapDevices(); 
     125        QStringList getPersonaCryptDevices(); 
    125126         
    126127        QString mountRemDev(QString node, QString mntdir, QString fs); 
Note: See TracChangeset for help on using the changeset viewer.