[patch] enable speed vs size option for md5sum

walter harms wharms at bfs.de
Mon Jan 16 11:03:39 UTC 2006


Hello list,
some time ago i ask about the size vs speed option in md5sum.
this patch will make the option available via menuconfig.
It contains only a fix for hash_fd.c to remove the current define.
Only the coreutils/Config.in is changed also.
the data are directly from the source code.

re,
  walter

I added the diff in attachment in case a mailer mangles it.

--- busybox-1.1.0-pre1/libbb/hash_fd.c.org      2006-01-15 
23:24:54.208093888 +0100
+++ busybox-1.1.0-pre1/libbb/hash_fd.c  2006-01-15 23:29:58.688805784 +0100
@@ -271,7 +271,6 @@
   *     3 (smallest)        5.1                4912
   */

-# define MD5SUM_SIZE_VS_SPEED 2

  /* Handle endian-ness */
  # if __BYTE_ORDER == __LITTLE_ENDIAN

--- busybox-1.1.0-pre1/coreutils/Config.in.org  2006-01-15 
23:20:53.296717984 +0100
+++ busybox-1.1.0-pre1/coreutils/Config.in      2006-01-15 
23:18:39.804011960 +0100
@@ -323,6 +323,21 @@
         help
           md5sum is used to print or check MD5 checksums.

+if CONFIG_MD5SUM
+       config MD5SUM_SIZE_VS_SPEED
+       int "  Trade Bytes for Speed"
+       default 2
+       help
+         Possible Values are from 0 to 3. Using 2 is a good
+         choise. The Table is a hint. Your milage may vary.
+                           user times (sec)  text size (386)
+         0 (fastest)         1.1                6144
+         1                   1.4                5392
+         2                   3.0                5088
+         3 (smallest)        5.1                4912
+
+endif
+
  config CONFIG_MKDIR
         bool "mkdir"
         default n

-------------- next part --------------
A non-text attachment was scrubbed...
Name: cu.conf.diff
Type: text/x-patch
Size: 760 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20060116/5b0e48f4/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hash_fd.diff
Type: text/x-patch
Size: 332 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20060116/5b0e48f4/attachment-0001.bin 


More information about the busybox mailing list