diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2008-05-31 18:50:17 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2008-05-31 18:50:17 +0000 |
commit | e0fd13e901253c5742f1e80778e149a0a07dc874 (patch) | |
tree | 2ca8cdca4cad42dead7768f0902e27e4268fc0f4 | |
parent | a76669c5956842c5d2b5b6137a4cd9232112f6b2 (diff) | |
download | busybox-w32-e0fd13e901253c5742f1e80778e149a0a07dc874.tar.gz busybox-w32-e0fd13e901253c5742f1e80778e149a0a07dc874.tar.bz2 busybox-w32-e0fd13e901253c5742f1e80778e149a0a07dc874.zip |
- shrink modprobe a little bit (~-40 bytes). ACKed by Yann.
-rw-r--r-- | modutils/modprobe.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/modutils/modprobe.c b/modutils/modprobe.c index afb4b3e93..db946bb2e 100644 --- a/modutils/modprobe.c +++ b/modutils/modprobe.c | |||
@@ -443,8 +443,7 @@ static struct dep_t *build_dep(void) | |||
443 | /* It's a dep description continuation */ | 443 | /* It's a dep description continuation */ |
444 | p = line_buffer; | 444 | p = line_buffer; |
445 | 445 | ||
446 | while (p && *p && isblank(*p)) | 446 | p = skip_whitespace(p); |
447 | p++; | ||
448 | 447 | ||
449 | /* p points to the first dependable module; if NULL, no dependable module */ | 448 | /* p points to the first dependable module; if NULL, no dependable module */ |
450 | if (p && *p) { | 449 | if (p && *p) { |
@@ -468,10 +467,8 @@ static struct dep_t *build_dep(void) | |||
468 | 467 | ||
469 | /* find the beginning of the module file name */ | 468 | /* find the beginning of the module file name */ |
470 | deps = bb_basename(p); | 469 | deps = bb_basename(p); |
471 | if (deps == p) { | 470 | if (deps == p) |
472 | while (isblank(*deps)) | 471 | deps = skip_whitespace(deps); |
473 | deps++; | ||
474 | } | ||
475 | 472 | ||
476 | /* find the end of the module name in the file name */ | 473 | /* find the end of the module name in the file name */ |
477 | if (ENABLE_FEATURE_2_6_MODULES | 474 | if (ENABLE_FEATURE_2_6_MODULES |
@@ -901,7 +898,7 @@ int modprobe_main(int argc, char **argv) | |||
901 | do { | 898 | do { |
902 | /* argv[optind] can be NULL here */ | 899 | /* argv[optind] can be NULL here */ |
903 | if (mod_remove(argv[optind])) { | 900 | if (mod_remove(argv[optind])) { |
904 | bb_error_msg("failed to remove module %s", | 901 | bb_error_msg("failed to %s module %s", "remove", |
905 | argv[optind]); | 902 | argv[optind]); |
906 | rc = EXIT_FAILURE; | 903 | rc = EXIT_FAILURE; |
907 | } | 904 | } |
@@ -911,7 +908,7 @@ int modprobe_main(int argc, char **argv) | |||
911 | bb_error_msg_and_die("no module or pattern provided"); | 908 | bb_error_msg_and_die("no module or pattern provided"); |
912 | 909 | ||
913 | if (mod_insert(argv[optind], argc - optind - 1, argv + optind + 1)) | 910 | if (mod_insert(argv[optind], argc - optind - 1, argv + optind + 1)) |
914 | bb_error_msg_and_die("failed to load module %s", argv[optind]); | 911 | bb_error_msg_and_die("failed to %s module %s", "load", argv[optind]); |
915 | } | 912 | } |
916 | 913 | ||
917 | /* Here would be a good place to free up memory allocated during the dependencies build. */ | 914 | /* Here would be a good place to free up memory allocated during the dependencies build. */ |