summaryrefslogtreecommitdiff
path: root/modutils
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer2008-05-31 18:50:17 +0000
committerBernhard Reutner-Fischer2008-05-31 18:50:17 +0000
commite0fd13e901253c5742f1e80778e149a0a07dc874 (patch)
tree2ca8cdca4cad42dead7768f0902e27e4268fc0f4 /modutils
parenta76669c5956842c5d2b5b6137a4cd9232112f6b2 (diff)
downloadbusybox-e0fd13e901253c5742f1e80778e149a0a07dc874.zip
busybox-e0fd13e901253c5742f1e80778e149a0a07dc874.tar.gz
- shrink modprobe a little bit (~-40 bytes). ACKed by Yann.
Diffstat (limited to 'modutils')
-rw-r--r--modutils/modprobe.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/modutils/modprobe.c b/modutils/modprobe.c
index afb4b3e..db946bb 100644
--- a/modutils/modprobe.c
+++ b/modutils/modprobe.c
@@ -443,8 +443,7 @@ static struct dep_t *build_dep(void)
/* It's a dep description continuation */
p = line_buffer;
- while (p && *p && isblank(*p))
- p++;
+ p = skip_whitespace(p);
/* p points to the first dependable module; if NULL, no dependable module */
if (p && *p) {
@@ -468,10 +467,8 @@ static struct dep_t *build_dep(void)
/* find the beginning of the module file name */
deps = bb_basename(p);
- if (deps == p) {
- while (isblank(*deps))
- deps++;
- }
+ if (deps == p)
+ deps = skip_whitespace(deps);
/* find the end of the module name in the file name */
if (ENABLE_FEATURE_2_6_MODULES
@@ -901,7 +898,7 @@ int modprobe_main(int argc, char **argv)
do {
/* argv[optind] can be NULL here */
if (mod_remove(argv[optind])) {
- bb_error_msg("failed to remove module %s",
+ bb_error_msg("failed to %s module %s", "remove",
argv[optind]);
rc = EXIT_FAILURE;
}
@@ -911,7 +908,7 @@ int modprobe_main(int argc, char **argv)
bb_error_msg_and_die("no module or pattern provided");
if (mod_insert(argv[optind], argc - optind - 1, argv + optind + 1))
- bb_error_msg_and_die("failed to load module %s", argv[optind]);
+ bb_error_msg_and_die("failed to %s module %s", "load", argv[optind]);
}
/* Here would be a good place to free up memory allocated during the dependencies build. */