]> git.proxmox.com Git - grub2.git/commitdiff
* grub-core/normal/autofs.c (autoload_fs_module): Save and restore
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sun, 22 Jul 2012 14:23:46 +0000 (16:23 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sun, 22 Jul 2012 14:23:46 +0000 (16:23 +0200)
filter state.

ChangeLog
grub-core/normal/autofs.c

index 35e76af29c275bea707ce6e291d09c6829c7adb9..38374a33ffcf307e817a37b560f66686aa8c20f9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-07-22  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/normal/autofs.c (autoload_fs_module): Save and restore
+       filter state.
+
 2012-07-22  Vladimir Serbinenko  <phcoder@gmail.com>
 
        Fix coreboot compilation.
index 0b27abf91364d849c54758890d1d7a2a54e09408..721b9c3256db793da31ab9c51ed7a3d688baf91e 100644 (file)
@@ -32,11 +32,21 @@ static int
 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 @@ autoload_fs_module (void)
       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.  */