On Tue, Feb 7, 2017 at 4:38 AM, Kang-Che Sung <explore...@gmail.com> wrote:
> On Tue, Feb 7, 2017 at 4:56 AM, Denys Vlasenko <vda.li...@googlemail.com> 
> wrote:
>> On Mon, Feb 6, 2017 at 4:38 AM, Kang-Che Sung <explore...@gmail.com> wrote:
>>> Thank you, but I hope you understand why I propose the not-so-simple route 
>>> in
>>> the patch. Especially regarding the use of is_depmod_or_modprobe macro.
>>
>> Not really. If you would explain it, it might increase chances of it
>> being accepted. Since I had to guess, I guessed "it probably saves a few 
>> bytes
>> of code at the cost of many more #ifdefs.
>
> Yes, it's to save a few bytes in the generated machine code.
> (Although I think of this later I might be putting to many #ifdefs
> than necessary.)
>
> Here this is sufficient:
>
>     #define is_depmod_or_modprobe \
>     ((ENABLE_MODPROBE || ENABLE_DEPMOD) \
>     && ((!ENABLE_INSMOD && !ENABLE_RMMOD) \
>     || (!ENABLE_MODPROBE && is_depmod) \
>     || ((applet_name[0] & '\x04') != 0)))

How about this?

-       if (is_depmod || is_modprobe) {
+       if ((MOD_APPLET_CNT == 2 && ENABLE_MODPROBE && ENABLE_DEPMOD)
+        || is_depmod || is_modprobe
+       ) {
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to