diff options
author | Rubin Simons <rubin.simons@raaftech.com> | 2016-03-23 17:54:59 +0100 |
---|---|---|
committer | Rubin Simons <rubin.simons@raaftech.com> | 2016-03-23 17:54:59 +0100 |
commit | a9c9e6d719544158f750a30594fe1ba3e7e27afe (patch) | |
tree | d0ac644cfb1d1f8fcc7eb0762102df9bda82be4e /libLumina/LuminaOS-Debian.cpp | |
parent | Fix up the format of the new wallpapers (use jpg instead on png: ~3MB per ima... (diff) | |
download | lumina-a9c9e6d719544158f750a30594fe1ba3e7e27afe.tar.gz lumina-a9c9e6d719544158f750a30594fe1ba3e7e27afe.tar.bz2 lumina-a9c9e6d719544158f750a30594fe1ba3e7e27afe.zip |
Make NVMe style devices show up as 'HDRIVE' type, just like sd[a-z] devices.
Diffstat (limited to 'libLumina/LuminaOS-Debian.cpp')
-rw-r--r-- | libLumina/LuminaOS-Debian.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libLumina/LuminaOS-Debian.cpp b/libLumina/LuminaOS-Debian.cpp index 1f84d44b..e351ddd0 100644 --- a/libLumina/LuminaOS-Debian.cpp +++ b/libLumina/LuminaOS-Debian.cpp @@ -40,7 +40,7 @@ QStringList LOS::ExternalDevicePaths(){ QString type = devs[i].section(" on ",0,0); type.remove("/dev/"); //Determine the type of hardware device based on the dev node - if(type.startsWith("sd")){ type = "HDRIVE"; } + if(type.startsWith("sd") || type.startsWith("nvme"){ type = "HDRIVE"; } else if(type.startsWith("sr")){ type="DVD"; } else if(type.contains("mapper")){ type="LVM"; } else{ type = "UNKNOWN"; } @@ -288,7 +288,7 @@ QStringList LOS::DiskUsage(){ //Returns: List of current read/write stats for ea info[i].replace("\t"," "); if(info[i].startsWith("Device:")){ labs = info[i].split(" ", QString::SkipEmptyParts); }//the labels for each column else{ - QStringList data = info[i].split(" ",QString::SkipEmptyParts); //data[0] is always the device + QStringList data = info[i].split(" ",QString::SkipEmptyParts); //data[0] is always the device if(data.length()>2 && labs.length()>2){ out << fmt.arg(data[0], data[3]+" "+labs[3], data[4]+" "+labs[4]); } |