aboutsummaryrefslogtreecommitdiff
path: root/modutils
diff options
context:
space:
mode:
authorGlenn L McGrath <bug1@ihug.co.nz>2004-08-11 05:56:30 +0000
committerGlenn L McGrath <bug1@ihug.co.nz>2004-08-11 05:56:30 +0000
commitfcf47321d4b121cd2de73c8d29fface50e192ae2 (patch)
tree0ae16f03392b81750573919052cb0624e7f7d5ca /modutils
parent18bbd9bf3b222eb85600f895c9a1f7dcb5f8ccef (diff)
downloadbusybox-fcf47321d4b121cd2de73c8d29fface50e192ae2.tar.gz
Patch from Mike Castle, dont print an empty line (patch modified by me to
change formatting).
Diffstat (limited to 'modutils')
-rw-r--r--modutils/modprobe.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/modutils/modprobe.c b/modutils/modprobe.c
index ddf63ab70..5d6c8f3ce 100644
--- a/modutils/modprobe.c
+++ b/modutils/modprobe.c
@@ -426,14 +426,20 @@ static int mod_process ( struct mod_list_t *list, int do_insert )
do_syslog ? "-s" : "", list-> m_module );
}
- if ( verbose )
- printf ( "%s\n", lcmd );
- if ( !show_only && *lcmd) {
- int rc2 = system ( lcmd );
- if (do_insert) rc = rc2; /* only last module matters */
- else if (!rc2) rc = 0; /* success if remove any mod */
+ if (*lcmd) {
+ if (verbose) {
+ printf("%s\n", lcmd);
+ }
+ if (!show_only) {
+ int rc2 = system(lcmd);
+ if (do_insert) {
+ rc = rc2; /* only last module matters */
+ }
+ else if (!rc2) {
+ rc = 0; /* success if remove any mod */
+ }
+ }
}
-
list = do_insert ? list-> m_prev : list-> m_next;
}
return (show_only) ? 0 : rc;
@@ -665,5 +671,3 @@ extern int modprobe_main(int argc, char** argv)
return EXIT_SUCCESS;
}
-
-