Bug#990745: [Pkg-zfsonlinux-devel] Bug#990745: better nvme device detection in cron scripts

2021-07-06 Thread Petter Reinholdtsen
[M. Zhou] > get_transp(){ Any chance you can explain how it is better? It would make it easier to review the code. Providing the change as a diff against the baseline would help too. -- Happy hacking Petter Reinholdtsen

Bug#990745: better nvme device detection in cron scripts

2021-07-05 Thread M. Zhou
Source: zfs-linux Version: 2.0.3-9 Severity: normal Tags: patch Credit: Miao Wang get_transp(){ local dev="$1" local par_dev="$dev" local pd while true; do pd=$(lsblk -dnr -o PKNAME "$par_dev") if [ "$?" -ne 0 ]; then return $? fi if [ -z "$pd" ]; then break else par_dev="/d