diff options
author | aldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-06-03 19:35:15 +0000 |
---|---|---|
committer | aldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-06-03 19:35:15 +0000 |
commit | ba086eee66e6ac97b1e5bcfb27acebcf961d9473 (patch) | |
tree | cd2151ee74f7350abcbe692f8115e91547e08e15 /modutils/modprobe.c | |
parent | d7cb55c66766707c386ec67e57797d5a8dea14b0 (diff) | |
download | busybox-w32-ba086eee66e6ac97b1e5bcfb27acebcf961d9473.tar.gz busybox-w32-ba086eee66e6ac97b1e5bcfb27acebcf961d9473.tar.bz2 busybox-w32-ba086eee66e6ac97b1e5bcfb27acebcf961d9473.zip |
- move #include busybox.h to the very top so we pull in the config
and eventual platform specific includes in early.
- remove two supposedly superfluous newlines from ...error_msg() in modprobe
and use shorter boilerplate while at it.
git-svn-id: svn://busybox.net/trunk/busybox@15272 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'modutils/modprobe.c')
-rw-r--r-- | modutils/modprobe.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modutils/modprobe.c b/modutils/modprobe.c index 44460391a..93e510293 100644 --- a/modutils/modprobe.c +++ b/modutils/modprobe.c | |||
@@ -11,6 +11,7 @@ | |||
11 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. | 11 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include "busybox.h" | ||
14 | #include <sys/utsname.h> | 15 | #include <sys/utsname.h> |
15 | #include <sys/types.h> | 16 | #include <sys/types.h> |
16 | #include <sys/wait.h> | 17 | #include <sys/wait.h> |
@@ -22,7 +23,6 @@ | |||
22 | #include <ctype.h> | 23 | #include <ctype.h> |
23 | #include <fcntl.h> | 24 | #include <fcntl.h> |
24 | #include <fnmatch.h> | 25 | #include <fnmatch.h> |
25 | #include "busybox.h" | ||
26 | 26 | ||
27 | struct mod_opt_t { /* one-way list of options to pass to a module */ | 27 | struct mod_opt_t { /* one-way list of options to pass to a module */ |
28 | char * m_opt_val; | 28 | char * m_opt_val; |
@@ -880,7 +880,7 @@ int modprobe_main(int argc, char** argv) | |||
880 | depend = build_dep ( ); | 880 | depend = build_dep ( ); |
881 | 881 | ||
882 | if ( !depend ) | 882 | if ( !depend ) |
883 | bb_error_msg_and_die ( "could not parse modules.dep\n" ); | 883 | bb_error_msg_and_die ( "could not parse modules.dep" ); |
884 | 884 | ||
885 | if (remove_opt) { | 885 | if (remove_opt) { |
886 | do { | 886 | do { |
@@ -893,7 +893,7 @@ int modprobe_main(int argc, char** argv) | |||
893 | } while ( ++optind < argc ); | 893 | } while ( ++optind < argc ); |
894 | } else { | 894 | } else { |
895 | if (optind >= argc) | 895 | if (optind >= argc) |
896 | bb_error_msg_and_die ( "No module or pattern provided\n" ); | 896 | bb_error_msg_and_die ( "No module or pattern provided" ); |
897 | 897 | ||
898 | if ( mod_insert ( argv [optind], argc - optind - 1, argv + optind + 1 )) | 898 | if ( mod_insert ( argv [optind], argc - optind - 1, argv + optind + 1 )) |
899 | bb_error_msg_and_die ( "failed to load module %s", argv [optind] ); | 899 | bb_error_msg_and_die ( "failed to load module %s", argv [optind] ); |