From c40a90429473185417c9b0d359d04c5bc269ade3 Mon Sep 17 00:00:00 2001 From: Harald Hope Date: Fri, 13 Nov 2015 12:00:16 -0800 Subject: [PATCH] New version, new tarball. Added tentative support for /dev/blcmmc0p12 type partitions and drive identifiers. This will probably require more fixes. --- inxi | 19 +++++++++---------- inxi.changelog | 13 +++++++++++++ 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/inxi b/inxi index d954741..015cca6 100755 --- a/inxi +++ b/inxi @@ -1,8 +1,8 @@ #!/usr/bin/env bash ######################################################################## #### Script Name: inxi -#### Version: 2.2.29 -#### Date: 2015-11-09 +#### Version: 2.2.30 +#### Date: 2015-11-13 #### Patch Number: 00 ######################################################################## #### SPECIAL THANKS @@ -6082,8 +6082,8 @@ get_hdd_data_basic() # also handles odd dm-1 type, from lvm, and mdraid, and some other bsd partition syntax # note that linux 3.2.45-grsec-9th types kernels have this type of partition name: /dev/xvdc (no number, letter) # note: btrfs does not seem to use partition integers, just the primary /dev/sdx identifier - # df can also show /dev/disk/(by-label|by-uuid etc) - /^\/dev\/(disk\/|mapper\/|[hsv]d[a-z]+[0-9]*|dm[-]?[0-9]+|ada[0-9]+p[0-9]+.*|(ad|sd|wd)[0-9]+[a-z]|md[0-9]+|[aw]d[0-9]+s.*|xvd[a-z]+)|^ROOT/ { + # df can also show /dev/disk/(by-label|by-uuid etc). /dev/mmcblock0p3 is type of ssd + /^\/dev\/(disk\/|mapper\/|[hsv]d[a-z]+[0-9]*|dm[-]?[0-9]+|(ada|mmcblock)[0-9]+p[0-9]+.*|(ad|sd|wd)[0-9]+[a-z]|md[0-9]+|[aw]d[0-9]+s.*|xvd[a-z]+)|^ROOT/ { # this handles the case where the first item is too long # and makes df wrap output to next line, so here we advance # it to the next line for that single case. Using df -P should @@ -6142,7 +6142,7 @@ get_hdd_data_basic() if [[ $B_PARTITIONS_FILE == 'true' ]];then A_HDD_DATA=( $( gawk -v hddUsed=$hdd_used ' - /[hsv]d[a-z]+$/ { + /[hsv]d[a-z]+|(ada|mmcblock)[0-9]+$/ { driveSize = $(NF - 1)*1024/1000**3 gsub(/,/, " ", driveSize) gsub(/^ +| +$/, "", driveSize) @@ -6154,7 +6154,7 @@ get_hdd_data_basic() # } # special case from this data: 8 0 156290904 sda # note: vm has 252/253/254 known starter, grsec has 202 - $1 ~ /^(3|8|22|33|202|252|253|254)$/ && $NF ~ /[hsv]d[a-z]+$/ && ( $2 % 16 == 0 || $2 % 16 == 8 ) { + $1 ~ /^(3|8|22|33|202|252|253|254)$/ && $NF ~ /[hsv]d[a-z]+|(ada|mmcblock)[0-9]+$/ && ( $2 % 16 == 0 || $2 % 16 == 8 ) { size += $3 } END { @@ -6372,9 +6372,8 @@ get_hard_drive_data_bsd() size=0 bSetSize="false" } - - $1 ~ /^(ad|ada|sd|wd)[0-9]+(|[[:space:]]at.*)$/ { - diskId=gensub(/^((ad|ada|sd|wd)[0-9]+)[^0-9].*/,"\\1",1,$1) + $1 ~ /^(ad|ada|mmcblock|sd|wd)[0-9]+(|[[:space:]]at.*)$/ { + diskId=gensub(/^((ad|ada|mmcblock|sd|wd)[0-9]+)[^0-9].*/,"\\1",1,$1) # note: /var/run/dmesg.boot may repeat items since it is not created # fresh every boot, this way, only the last items will be used per disk id if (aIds[diskId] == "" ) { @@ -8096,7 +8095,7 @@ get_partition_data_advanced() # if this works, great, otherwise, just set this to null values partTemp="'$( readlink /dev/root 2>/dev/null )'" if ( partTemp != "" ) { - if ( partTemp ~ /[hsv]d[a-z]+[0-9]{1,2}/ ) { + if ( partTemp ~ /[hsv]d[a-z]+[0-9]{1,2}|(ada|mmcblock)[0-9]+p[0-9]+/ ) { partition=gensub( /^(\/dev\/)(.+)$/, "\\2", 1, partTemp ) } else if ( partTemp ~ /by-uuid/ ) { diff --git a/inxi.changelog b/inxi.changelog index bdeb994..68e75c4 100755 --- a/inxi.changelog +++ b/inxi.changelog @@ -1,3 +1,16 @@ +===================================================================================== +Version: 2.2.30 +Patch Version: 00 +Script Date: 2015-11-13 +----------------------------------- +Changes: +----------------------------------- +New version, new tarball. Added tentative support for /dev/blcmmc0p12 type partitions +and drive identifiers. This will probably require more fixes. + +----------------------------------- +-- Harald Hope - Fri, 13 Nov 2015 11:58:17 -0800 + ===================================================================================== Version: 2.2.29 Patch Version: 00