Commit c8cf9b7c authored by longpanda's avatar longpanda
Browse files

Speedup md5sum/sha1sum/sha256sum/sha512sum command

parent 4c71d7c1
...@@ -69,7 +69,7 @@ hash_file (grub_file_t file, const gcry_md_spec_t *hash, void *result) ...@@ -69,7 +69,7 @@ hash_file (grub_file_t file, const gcry_md_spec_t *hash, void *result)
grub_uint64_t total = 0; grub_uint64_t total = 0;
void *context; void *context;
grub_uint8_t *readbuf; grub_uint8_t *readbuf;
#define BUF_SIZE 4096 #define BUF_SIZE 1024 * 1024
readbuf = grub_malloc (BUF_SIZE); readbuf = grub_malloc (BUF_SIZE);
if (!readbuf) if (!readbuf)
return grub_errno; return grub_errno;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment