diff options
author | BlackNoxis <steven.darklight@gmail.com> | 2014-02-15 23:24:26 +0200 |
---|---|---|
committer | BlackNoxis <steven.darklight@gmail.com> | 2014-02-15 23:24:26 +0200 |
commit | 7224c1253228e5c29c78cb3f0f26ce34770f2356 (patch) | |
tree | 1684924656132935256e034f35f92abee6623265 /sys-boot/grub/files/grub-2.00-compression.patch |
Added ebuilds for kogaion desktop
Diffstat (limited to 'sys-boot/grub/files/grub-2.00-compression.patch')
-rw-r--r-- | sys-boot/grub/files/grub-2.00-compression.patch | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/sys-boot/grub/files/grub-2.00-compression.patch b/sys-boot/grub/files/grub-2.00-compression.patch new file mode 100644 index 00000000..58bc1f93 --- /dev/null +++ b/sys-boot/grub/files/grub-2.00-compression.patch @@ -0,0 +1,84 @@ +https://bugs.gentoo.org/show_bug.cgi?id=424527 +https://savannah.gnu.org/bugs/index.php?36770 + +=== modified file 'grub-core/lib/xzembed/xz_dec_stream.c' +--- grub-core/lib/xzembed/xz_dec_stream.c 2012-02-29 13:56:51 +0000 ++++ grub-core/lib/xzembed/xz_dec_stream.c 2012-07-22 14:27:03 +0000 +@@ -403,18 +403,25 @@ + } + #endif + +- do { ++ if (b->in_pos == b->in_size) ++ return XZ_OK; ++ ++ if (!crc32 && s->hash_size == 0) ++ s->pos += 8; ++ ++ while (s->pos < (crc32 ? 32 : s->hash_size * 8)) { + if (b->in_pos == b->in_size) + return XZ_OK; + + #ifndef GRUB_EMBED_DECOMPRESSOR +- if (hash && s->hash_value[s->pos / 8] != b->in[b->in_pos++]) ++ if (hash && s->hash_value[s->pos / 8] != b->in[b->in_pos]) + return XZ_DATA_ERROR; + #endif ++ b->in_pos++; + + s->pos += 8; + +- } while (s->pos < (crc32 ? 32 : s->hash_size * 8)); ++ } + + #ifndef GRUB_EMBED_DECOMPRESSOR + if (s->hash) +@@ -529,8 +536,6 @@ + s->hash->init(s->index.hash.hash_context); + s->hash->init(s->block.hash.hash_context); + } +- if (!s->hash) +- return XZ_OPTIONS_ERROR; + #endif + } + else + +=== modified file 'grub-core/normal/autofs.c' +--- grub-core/normal/autofs.c 2012-05-01 13:26:36 +0000 ++++ grub-core/normal/autofs.c 2012-07-22 14:23:46 +0000 +@@ -32,11 +32,21 @@ + autoload_fs_module (void) + { + grub_named_list_t p; ++ int ret = 0; ++ grub_file_filter_t grub_file_filters_was[GRUB_FILE_FILTER_MAX]; ++ ++ grub_memcpy (grub_file_filters_was, grub_file_filters_enabled, ++ sizeof (grub_file_filters_enabled)); ++ grub_memcpy (grub_file_filters_enabled, grub_file_filters_all, ++ sizeof (grub_file_filters_enabled)); + + while ((p = fs_module_list) != NULL) + { + if (! grub_dl_get (p->name) && grub_dl_load (p->name)) +- return 1; ++ { ++ ret = 1; ++ break; ++ } + + if (grub_errno) + grub_print_error (); +@@ -46,7 +56,10 @@ + grub_free (p); + } + +- return 0; ++ grub_memcpy (grub_file_filters_enabled, grub_file_filters_was, ++ sizeof (grub_file_filters_enabled)); ++ ++ return ret; + } + + /* Read the file fs.lst for auto-loading. */ + |