Re: [PATCH 1/2] When a new module is loaded, update the kernel_filesystems list.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Looks fine.

On 04/09/2009 09:58 AM, Chris Lumens wrote:
---
  storage/formats/fs.py |    8 ++++++++
  1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/storage/formats/fs.py b/storage/formats/fs.py
index 657f73c..19f488c 100644
--- a/storage/formats/fs.py
+++ b/storage/formats/fs.py
@@ -53,6 +53,8 @@ def get_kernel_filesystems():
      for line in open("/proc/filesystems").readlines():
          fs_list.append(line.split()[-1])
      return fs_list
+
+global kernel_filesystems
  kernel_filesystems = get_kernel_filesystems()

  def fsFromConfig(attrs, *args, **kwargs):
@@ -433,6 +435,8 @@ class FS(DeviceFormat):

      def loadModule(self):
          """Load whatever kernel module is required to support this filesystem."""
+        global kernel_filesystems
+
          if not self._modules or self.type in kernel_filesystems:
              return

@@ -451,6 +455,10 @@ class FS(DeviceFormat):
                  self._supported = False
                  return

+        # If we successfully loaded a kernel module, for this filesystem, we
+        # also need to update the list of supported filesystems.
+        kernel_filesystems = get_kernel_filesystems()
+
      def mount(self, *args, **kwargs):
          """ Mount this filesystem.



--
David Cantrell <dcantrell@xxxxxxxxxx>
Red Hat / Honolulu, HI

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux