mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +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)
|
||||
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"
|
||||
# $proc_info_string: print speed "," multisession "," mcn "," audio "," cdr "," cdrw "," dvd "," dvdr "," dvdram
|
||||
END {
|
||||
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" ) )
|
||||
IFS="$ORIGINAL_IFS"
|
||||
|
|
Loading…
Reference in a new issue