summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoerg Schirottke <master@kanotix.com>2015-12-08 22:53:15 +0100
committerHolger Paradies <retabell@gmx.de>2016-04-25 09:51:16 +0200
commit52d72cc7028514aace395e775561182035b59827 (patch)
treea1ecc5ce75cb1a6c4dc60060c430c13eff721bec
parent3dd101dc1b08dd572e1bc1d26463986f007e0b62 (diff)
downloadacritoxinstaller-52d72cc7028514aace395e775561182035b59827.zip
acritoxinstaller-52d72cc7028514aace395e775561182035b59827.tar.gz
added listing of NVME partitions/disks
-rw-r--r--backend/modules/partitions3
1 files changed, 2 insertions, 1 deletions
diff --git a/backend/modules/partitions b/backend/modules/partitions
index 4ea9b55..ccb8abf 100644
--- a/backend/modules/partitions
+++ b/backend/modules/partitions
@@ -19,7 +19,7 @@ function strip_live_media()
function list_all_disks()
{
(
- awk -vli="$(awk '{if($2=="sd"||$2=="md") print $1;}' /proc/devices)" 'BEGIN{m=split(li,list," ")}{for(i=1;i<=m;i++) if(($1==list[i]&&$2%16==0)||($1==list[i]&&$2==126)) print "/dev/"$4;}' /proc/partitions
+ awk -vli="$(awk '{if($2=="sd"||$2=="md"||$2=="nvme") print $1;}' /proc/devices)" 'BEGIN{m=split(li,list," ")}{for(i=1;i<=m;i++) if(($1==list[i]&&$2%16==0)||($1==list[i]&&$2==126||($1==list[i]+8&&$2%16==0))) print "/dev/"$4;}' /proc/partitions
) | strip_live_media
}
@@ -49,6 +49,7 @@ function list_all_partitions()
(
awk -vli="$(awk '{if($2=="sd") print $1;}' /proc/devices)" 'BEGIN{m=split(li,list," ")}{for(i=1;i<=m;i++) if($1==list[i]&&$2%16!=0) print "/dev/"$4;}' /proc/partitions
awk -vli="$(awk '{if($2=="md") print $1;}' /proc/devices)" 'BEGIN{m=split(li,list," ")}{for(i=1;i<=m;i++) if($1==list[i]||$1==list[i]+250) print "/dev/"$4;}' /proc/partitions
+ awk -vli="$(awk '{if($2=="nvme") print $1;}' /proc/devices)" 'BEGIN{m=split(li,list," ")}{for(i=1;i<=m;i++) if($1==list[i]+8) print "/dev/"$4;}' /proc/partitions
list_dm_partitions
) | strip_live_media
}