[PATCH 1/2] null_blk: add ability to use a quiet modprobe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux