mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
trying to get cd speed
This commit is contained in:
parent
023903796c
commit
7ac76db61c
9
inxi
9
inxi
|
@ -7452,12 +7452,19 @@ get_optical_drive_data_bsd()
|
||||||
sub(/serial[[:space:]]+number[[:space:]]*/,"",$NF)
|
sub(/serial[[:space:]]+number[[:space:]]*/,"",$NF)
|
||||||
aDisks[nr, "serial"] = $NF
|
aDisks[nr, "serial"] = $NF
|
||||||
}
|
}
|
||||||
|
if ( $NF ~ /[GM]B\/s/ ){
|
||||||
|
speed=gensub(/^[0-9\.]+[[:space:]]*[GM]B\/s).*/,"\\1",1,$NF)
|
||||||
|
sub(/\.[0-9]+/,"",speed)
|
||||||
|
if ( speed ~ /^[0-9]+/ ) {
|
||||||
|
aDisks[nr, "speed"] = speed
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
# "$link,dev-readlinks,$vendor,$model,$rev_number,$proc_info_string,$state"
|
# "$link,dev-readlinks,$vendor,$model,$rev_number,$proc_info_string,$state"
|
||||||
# $proc_info_string: print speed "," multisession "," mcn "," audio "," cdr "," cdrw "," dvd "," dvdr "," dvdram
|
# $proc_info_string: print speed "," multisession "," mcn "," audio "," cdr "," cdrw "," dvd "," dvdr "," dvdram
|
||||||
END {
|
END {
|
||||||
for (i=1;i<=nr;i++) {
|
for (i=1;i<=nr;i++) {
|
||||||
print aDisks[i, "id"] ",,," aDisks[i, "model"] "," aDisks[i, "rev"] ",,,,,,,,,"
|
print aDisks[i, "id"] ",,," aDisks[i, "model"] "," aDisks[i, "rev"] "," aDisks[i, "speed"] ",,,,,,,,"
|
||||||
}
|
}
|
||||||
}' <<< "$Dmesg_Boot_Data" ) )
|
}' <<< "$Dmesg_Boot_Data" ) )
|
||||||
IFS="$ORIGINAL_IFS"
|
IFS="$ORIGINAL_IFS"
|
||||||
|
|
Loading…
Reference in a new issue