unix/fiss

don't execute modprobe if nothing is given (0d5086a1638c70580e7643a89ca1f4f4dc288b80)
Repositories | LICENSE

commit 0d5086a1638c70580e7643a89ca1f4f4dc288b80
parent 7e28200ba2dcd8d2e173fe26f521240bae62a890
Author: Friedel Schön <[email protected]>
Date:   Sun, 11 Jun 2023 01:20:32 +0200

don't execute modprobe if nothing is given

Diffstat:
Mbin/modules-load.c3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/bin/modules-load.c b/bin/modules-load.c @@ -111,6 +111,9 @@ int main(int argc, char** argv) { read_dir("/run/modules-load.d/"); read_dir("/usr/lib/modules-load.d/"); + if (modules_size == 0) + return 0; + for (int i = 0; i < modules_size; i++) { printf("%s\n", modules[i]); }