mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
bug hunting
This commit is contained in:
parent
26bac8e668
commit
0600dd519e
8
inxi
8
inxi
|
@ -2387,18 +2387,16 @@ get_partition_data_advanced()
|
||||||
|
|
||||||
# slice out the /dev
|
# slice out the /dev
|
||||||
partition=gensub( /^(\/dev\/)(.+)$/, "\\2", 1, $1 )
|
partition=gensub( /^(\/dev\/)(.+)$/, "\\2", 1, $1 )
|
||||||
# label and uuid can occur for root
|
# label and uuid can occur for root, set partition to null now
|
||||||
if ( partition ~ /by-label/ ) {
|
if ( partition ~ /by-label/ ) {
|
||||||
label=gensub( /^(\/dev\/disk\/by-label\/)(.+)$/, "\\2", 1, $1 )
|
label=gensub( /^(\/dev\/disk\/by-label\/)(.+)$/, "\\2", 1, $1 )
|
||||||
|
partition = ""
|
||||||
}
|
}
|
||||||
if ( partition ~ /by-uuid/ ) {
|
if ( partition ~ /by-uuid/ ) {
|
||||||
uuid=gensub( /^(\/dev\/disk\/by-uuid\/)(.+)$/, "\\2", 1, $1 )
|
uuid=gensub( /^(\/dev\/disk\/by-uuid\/)(.+)$/, "\\2", 1, $1 )
|
||||||
}
|
|
||||||
# if partition is not standard /dev/h/dx, but rather /dev/disk/... set it null since
|
|
||||||
# that is not useful for this purpose.
|
|
||||||
if ( partition ~ /disk/ ) {
|
|
||||||
partition = ""
|
partition = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
# handle Arch /dev/root for / id
|
# handle Arch /dev/root for / id
|
||||||
if ( partition == "root" ) {
|
if ( partition == "root" ) {
|
||||||
partTemp="'$( readlink /dev/root 2>/dev/null )'"
|
partTemp="'$( readlink /dev/root 2>/dev/null )'"
|
||||||
|
|
Loading…
Reference in a new issue