This commit is contained in:
inxi-svn 2014-09-20 03:25:17 +00:00
parent 7ac76db61c
commit 58651ac5e5

2
inxi
View file

@ -7453,7 +7453,7 @@ get_optical_drive_data_bsd()
aDisks[nr, "serial"] = $NF aDisks[nr, "serial"] = $NF
} }
if ( $NF ~ /[GM]B\/s/ ){ if ( $NF ~ /[GM]B\/s/ ){
speed=gensub(/^[0-9\.]+[[:space:]]*[GM]B\/s).*/,"\\1",1,$NF) speed=gensub(/^([0-9\.]+[[:space:]]*[GM]B\/s).*/,"\\1",1,$NF)
sub(/\.[0-9]+/,"",speed) sub(/\.[0-9]+/,"",speed)
if ( speed ~ /^[0-9]+/ ) { if ( speed ~ /^[0-9]+/ ) {
aDisks[nr, "speed"] = speed aDisks[nr, "speed"] = speed