aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277>2004-08-11 05:56:30 +0000
committerbug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277>2004-08-11 05:56:30 +0000
commit8ad42192a2ce3f913e10b94466f8048f652c4571 (patch)
tree0ae16f03392b81750573919052cb0624e7f7d5ca
parent6eba5c19bc8f5673b264256067be02dca8e8f4a1 (diff)
downloadbusybox-w32-8ad42192a2ce3f913e10b94466f8048f652c4571.tar.gz
busybox-w32-8ad42192a2ce3f913e10b94466f8048f652c4571.tar.bz2
busybox-w32-8ad42192a2ce3f913e10b94466f8048f652c4571.zip
Patch from Mike Castle, dont print an empty line (patch modified by me to
change formatting). git-svn-id: svn://busybox.net/trunk/busybox@9086 69ca8d6d-28ef-0310-b511-8ec308f3f277
-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