btrfs-progs: tests/nullb fix kernel support check
I have a setup where null_blk is not a module but is built-in, so to check if the kernel supports null_blk, use 'modinfo -n'. Also fix a comment. Signed-off-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
9c9805869e
commit
2d872fec8c
|
@ -8,7 +8,7 @@
|
|||
# - load required modules and mount configfs
|
||||
#
|
||||
# nullb create [-s size] [-z zonesize]
|
||||
# - create a new device with given sizes, allocating the first free indes, #
|
||||
# - create a new device with given sizes, allocating the first free index,
|
||||
# device is /dev/nullb$index
|
||||
#
|
||||
# nullb ls
|
||||
|
@ -51,8 +51,8 @@ function _dbg() {
|
|||
}
|
||||
|
||||
function _check_setup() {
|
||||
if ! grep -q null_blk /proc/modules; then
|
||||
_error "module not loaded"
|
||||
if ! modinfo -n null_blk > /dev/null; then
|
||||
_error "module not compiled/loaded"
|
||||
fi
|
||||
if ! grep -q configfs /proc/filesystems; then
|
||||
_error "configfs not mounted"
|
||||
|
|
Loading…
Reference in New Issue