Currently, _have_scsi_debug_group_number_stats() assumes that scsi_debug is loadable. This does not work when scsi_debug is built-in. Before loading scsi_debug in the function, ensure that scsi_debug is loadable. Signed-off-by: Shin'ichiro Kawasaki --- common/scsi_debug | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/scsi_debug b/common/scsi_debug index 97a65c2..6aa7420 100644 --- a/common/scsi_debug +++ b/common/scsi_debug @@ -49,6 +49,8 @@ _scsi_debug_key_path() { _have_scsi_debug_group_number_stats() { local ret=0 + _have_loadable_scsi_debug || return 1 + modprobe -qr scsi_debug >&/dev/null modprobe -q scsi_debug delay=0 >&/dev/null if ! [[ -e ${SD_PSEUDO_PATH}/group_number_stats ]]; then -- 2.49.0