Message ID | 20230417124728.458630-2-shinichiro@fastmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | support built-in scsi_debug | expand |
On 4/17/23 05:47, Shin'ichiro Kawasaki wrote: > From: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com> > > When all of the kernel modules are built-in, /lib/modules/*/kernel path > may not exist. In this case, check for the path results in failure. Skip > the check when the path does not exist. > > Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com> > --- > Looks good. Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> -ck
diff --git a/common/rc b/common/rc index af4c0b1..f67b434 100644 --- a/common/rc +++ b/common/rc @@ -36,6 +36,7 @@ _module_file_exists() local -i count libpath="/lib/modules/$(uname -r)/kernel" + [[ ! -d $libpath ]] && return 1 count=$(find "$libpath" -name "$ko_underscore*" -o \ -name "$ko_hyphen*" | wc -l) ((count)) && return 0