a5bd9f6
From 1f75c529d5309defb33c8c216422003eee1248a5 Mon Sep 17 00:00:00 2001
a5bd9f6
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
a5bd9f6
Date: Sun, 22 Jul 2012 16:23:46 +0200
a5bd9f6
Subject: [PATCH 012/364] 	* grub-core/normal/autofs.c
a5bd9f6
 (autoload_fs_module): Save and restore 	filter state.
a5bd9f6
a5bd9f6
---
a5bd9f6
 ChangeLog                 |  5 +++++
a5bd9f6
 grub-core/normal/autofs.c | 17 +++++++++++++++--
a5bd9f6
 2 files changed, 20 insertions(+), 2 deletions(-)
a5bd9f6
a5bd9f6
diff --git a/ChangeLog b/ChangeLog
a5bd9f6
index 35e76af..38374a3 100644
a5bd9f6
--- a/ChangeLog
a5bd9f6
+++ b/ChangeLog
a5bd9f6
@@ -1,5 +1,10 @@
a5bd9f6
 2012-07-22  Vladimir Serbinenko  <phcoder@gmail.com>
a5bd9f6
 
a5bd9f6
+	* grub-core/normal/autofs.c (autoload_fs_module): Save and restore
a5bd9f6
+	filter state.
a5bd9f6
+
a5bd9f6
+2012-07-22  Vladimir Serbinenko  <phcoder@gmail.com>
a5bd9f6
+
a5bd9f6
 	Fix coreboot compilation.
a5bd9f6
 
a5bd9f6
 	* grub-core/term/i386/pc/vga_text.c (grub_vga_text_init): Rename to ...
a5bd9f6
diff --git a/grub-core/normal/autofs.c b/grub-core/normal/autofs.c
a5bd9f6
index 0b27abf..721b9c3 100644
a5bd9f6
--- a/grub-core/normal/autofs.c
a5bd9f6
+++ b/grub-core/normal/autofs.c
a5bd9f6
@@ -32,11 +32,21 @@ static int
a5bd9f6
 autoload_fs_module (void)
a5bd9f6
 {
a5bd9f6
   grub_named_list_t p;
a5bd9f6
+  int ret = 0;
a5bd9f6
+  grub_file_filter_t grub_file_filters_was[GRUB_FILE_FILTER_MAX];
a5bd9f6
+
a5bd9f6
+  grub_memcpy (grub_file_filters_was, grub_file_filters_enabled,
a5bd9f6
+	       sizeof (grub_file_filters_enabled));
a5bd9f6
+  grub_memcpy (grub_file_filters_enabled, grub_file_filters_all,
a5bd9f6
+	       sizeof (grub_file_filters_enabled));
a5bd9f6
 
a5bd9f6
   while ((p = fs_module_list) != NULL)
a5bd9f6
     {
a5bd9f6
       if (! grub_dl_get (p->name) && grub_dl_load (p->name))
a5bd9f6
-	return 1;
a5bd9f6
+	{
a5bd9f6
+	  ret = 1;
a5bd9f6
+	  break;
a5bd9f6
+	}
a5bd9f6
 
a5bd9f6
       if (grub_errno)
a5bd9f6
 	grub_print_error ();
a5bd9f6
@@ -46,7 +56,10 @@ autoload_fs_module (void)
a5bd9f6
       grub_free (p);
a5bd9f6
     }
a5bd9f6
 
a5bd9f6
-  return 0;
a5bd9f6
+  grub_memcpy (grub_file_filters_enabled, grub_file_filters_was,
a5bd9f6
+	       sizeof (grub_file_filters_enabled));
a5bd9f6
+
a5bd9f6
+  return ret;
a5bd9f6
 }
a5bd9f6
 
a5bd9f6
 /* Read the file fs.lst for auto-loading.  */
a5bd9f6
-- 
a5bd9f6
1.8.1.4
a5bd9f6