[PATCH] modprobe: simplify code (printf in do_modprobe())
Kang-Che Sung
explorer09 at gmail.com
Mon Feb 13 01:52:21 UTC 2017
On Mon, Feb 13, 2017 at 4:55 AM, Denys Vlasenko
<vda.linux at googlemail.com> wrote:
> This would print extra trailing space.
>
> On Thu, Feb 9, 2017 at 4:02 PM, Kang-Che Sung <explorer09 at gmail.com> wrote:
>> Signed-off-by: Kang-Che Sung <explorer09 at gmail.com>
>> ---
>> modutils/modprobe.c | 5 ++---
>> 1 file changed, 2 insertions(+), 3 deletions(-)
>>
>> diff --git a/modutils/modprobe.c b/modutils/modprobe.c
>> index a6224fa63..58e8b5a15 100644
>> --- a/modutils/modprobe.c
>> +++ b/modutils/modprobe.c
>> @@ -466,10 +466,9 @@ static int do_modprobe(struct module_entry *m)
>> #endif
>>
>> if (option_mask32 & OPT_SHOW_DEPS) {
>> - printf(options ? "insmod %s/%s/%s %s\n"
>> - : "insmod %s/%s/%s\n",
>> + printf("insmod %s/%s/%s %s\n",
>> CONFIG_DEFAULT_MODULES_DIR, G.uts.release, fn,
>> - options);
>> + options ? options : "");
>> free(options);
>> continue;
>> }
>> --
>> 2.11.0
>>
kmod's modprobe will also print that extra space anyway.
More information about the busybox
mailing list