aboutsummaryrefslogtreecommitdiff
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
parent18bbd9bf3b222eb85600f895c9a1f7dcb5f8ccef (diff)
downloadbusybox-w32-fcf47321d4b121cd2de73c8d29fface50e192ae2.tar.gz
busybox-w32-fcf47321d4b121cd2de73c8d29fface50e192ae2.tar.bz2
busybox-w32-fcf47321d4b121cd2de73c8d29fface50e192ae2.zip
Patch from Mike Castle, dont print an empty line (patch modified by me to
change formatting).
-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 )
426 do_syslog ? "-s" : "", list-> m_module ); 426 do_syslog ? "-s" : "", list-> m_module );
427 } 427 }
428 428
429 if ( verbose ) 429 if (*lcmd) {
430 printf ( "%s\n", lcmd ); 430 if (verbose) {
431 if ( !show_only && *lcmd) { 431 printf("%s\n", lcmd);
432 int rc2 = system ( lcmd ); 432 }
433 if (do_insert) rc = rc2; /* only last module matters */ 433 if (!show_only) {
434 else if (!rc2) rc = 0; /* success if remove any mod */ 434 int rc2 = system(lcmd);
435 if (do_insert) {
436 rc = rc2; /* only last module matters */
437 }
438 else if (!rc2) {
439 rc = 0; /* success if remove any mod */
440 }
441 }
435 } 442 }
436
437 list = do_insert ? list-> m_prev : list-> m_next; 443 list = do_insert ? list-> m_prev : list-> m_next;
438 } 444 }
439 return (show_only) ? 0 : rc; 445 return (show_only) ? 0 : rc;
@@ -665,5 +671,3 @@ extern int modprobe_main(int argc, char** argv)
665 671
666 return EXIT_SUCCESS; 672 return EXIT_SUCCESS;
667} 673}
668
669