[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: [PATCH] modprobe: simplify code (printf in do_modprobe())
From: Kang-Che Sung <explorer09 () gmail ! com>
Date: 2017-02-13 1:52:21
Message-ID: CADDzAfMc8zQNQ7-rns9mM2fdc8XsU93M_6z+Kh1-izX=bHU58Q () mail ! gmail ! com
[Download RAW message or body]
On Mon, Feb 13, 2017 at 4:55 AM, Denys Vlasenko
<vda.linux@googlemail.com> wrote:
> This would print extra trailing space.
>
> On Thu, Feb 9, 2017 at 4:02 PM, Kang-Che Sung <explorer09@gmail.com> wrote:
>> Signed-off-by: Kang-Che Sung <explorer09@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.
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic