Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

give add_driver_classes meaningful return values

  • Loading branch information...
commit dbffde7743be918f961fef2433b4176f33b50d87 1 parent 340a7c4
@falconindy authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 geninit.api
View
6 geninit.api
@@ -182,6 +182,7 @@ use_hookscript() { # {{{
add_driver_classes() { # {{{
local -a mods
+ local -i ret=0
local mod=
# find modules by class (e.g. drivers/ata)
@@ -198,7 +199,10 @@ add_driver_classes() { # {{{
fi
for mod in "${mods[@]}"; do
- add_module "$mod"
+ add_module "$mod" && (( ++ret ))
done
+
+ # return 0 on modules added, else 1
+ return $(( ! ret ))
} # }}}
Please sign in to comment.
Something went wrong with that request. Please try again.