diff options
author | Andreas Loibl <andreas@andreas-loibl.de> | 2011-03-25 04:19:48 +0100 |
---|---|---|
committer | Andreas Loibl <andreas@andreas-loibl.de> | 2011-03-25 04:19:48 +0100 |
commit | f73535dba2c0ac1891da0ab81672d2a490d5d628 (patch) | |
tree | 76528bb30c59b7496520c6b94b34e8d9d8645bea /backend/modules/partitions | |
parent | 9c63b98c194ed54e827e3380057219286963b58c (diff) | |
download | acritoxinstaller-f73535dba2c0ac1891da0ab81672d2a490d5d628.zip acritoxinstaller-f73535dba2c0ac1891da0ab81672d2a490d5d628.tar.gz |
added hdmap- and (initial) devicemapper-support to frontend
Diffstat (limited to 'backend/modules/partitions')
-rw-r--r-- | backend/modules/partitions | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/backend/modules/partitions b/backend/modules/partitions index 0d59323..c869053 100644 --- a/backend/modules/partitions +++ b/backend/modules/partitions @@ -36,6 +36,17 @@ 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 } +# Synopsis: list_dm_partitions +# +# This function lists all device-mapper partitions +# Output example: +# /dev/mapper/volg-home +# /dev/mapper/cryptoroot +function list_dm_partitions() +{ + ls /dev/mapper/* 2>/dev/null | fmt -w1 | grep -v "/control$" +} + # Synopsis: (e.g.) list_all_partitions | partitions_usage_details # # This function lists usage details for a list of partitions from STDIN |