On Thu, Aug 7, 2008 at 1:07 PM, Pascal Bellard
<[EMAIL PROTECTED]> wrote:
> Please find attached a patch to handle compressed modules (gzip, bzip2 or
> lzma)

+static int ext_size(char *end USE_FEATURE_2_6_MODULES(, int k_version))
+{

Do it like this instead:

#if !ENABLE_FEATURE_2_6_MODULES
#define ext_size(end, k_version) ext_size(end)
#endif
static int ext_size(char *end USE_FEATURE_2_6_MODULES(, int k_version))
...

This way you do not need USE_FEATURE_2_6_MODULES() at every call site.

+#if ENABLE_FEATURE_2_6_MODULES
+       if (ENABLE_FEATURE_2_6_MODULES

Superfluous second check for ENABLE_FEATURE_2_6_MODULES

+                       && (k_version > 4) && (next[-2] == '.')
+                       && (next[-1] == 'k') && (next[0] == 'o'))
+               ext += 3;
+       else
+#endif


Also, I believe xalloc_load_module()-like code is already exists
as the xmalloc_open_zipped_read_close(), can you use that?

--
vda
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to