We may want to ignore modprobe errors. For instance when doing error injection. Signed-off-by: Luis Chamberlain <mcgrof@xxxxxxxxxx> --- common/null_blk | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/common/null_blk b/common/null_blk index 6611db0..720dcd8 100644 --- a/common/null_blk +++ b/common/null_blk @@ -19,9 +19,15 @@ _init_null_blk() { _remove_null_blk_devices local zoned="" + local modprobe_load_args="" + + if [ ! -z "$NULL_BLK_QUIET_MODPROBE" ]; then + modprobe_load_args="-q" + fi + if (( RUN_FOR_ZONED )); then zoned="zoned=1"; fi - if ! modprobe -r null_blk || ! modprobe null_blk "$@" "${zoned}" ; then + if ! modprobe -r null_blk || ! modprobe null_blk $modprobe_load_args "$@" "${zoned}" ; then return 1 fi -- 2.30.2