Patchwork [26/35] wic: Remove Mount object

login
register
mail settings
Submitter tom.zanussi@linux.intel.com
Date Aug. 8, 2014, 10:05 p.m.
Message ID <3d4bc2719a950e8da752adef0a89dd33eda1bd53.1407533201.git.tom.zanussi@linux.intel.com>
Download mbox | patch
Permalink /patch/77631/
State Accepted
Commit bd0dd4489e15700333185a6afc6ea53a397246fb
Headers show

Comments

tom.zanussi@linux.intel.com - Aug. 8, 2014, 10:05 p.m.
It doesn't do anything we need, so remove it and fix up callers/base
classes.

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
---
 scripts/lib/mic/utils/fs_related.py    | 16 ----------------
 scripts/lib/mic/utils/partitionedfs.py |  4 +---
 2 files changed, 1 insertion(+), 19 deletions(-)

Patch

diff --git a/scripts/lib/mic/utils/fs_related.py b/scripts/lib/mic/utils/fs_related.py
index e6e362d..07a5ff9 100644
--- a/scripts/lib/mic/utils/fs_related.py
+++ b/scripts/lib/mic/utils/fs_related.py
@@ -112,19 +112,3 @@  class DiskImage(Disk):
         exec_cmd(dd_cmd)
 
         self.device = self.image_file
-
-
-class Mount:
-    """A generic base class to deal with mounting things."""
-    def __init__(self, mountdir):
-        self.mountdir = mountdir
-
-    def cleanup(self):
-        self.unmount()
-
-    def mount(self, options = None):
-        pass
-
-    def unmount(self):
-        pass
-
diff --git a/scripts/lib/mic/utils/partitionedfs.py b/scripts/lib/mic/utils/partitionedfs.py
index ef92125..50536b4 100644
--- a/scripts/lib/mic/utils/partitionedfs.py
+++ b/scripts/lib/mic/utils/partitionedfs.py
@@ -32,9 +32,8 @@  MBR_OVERHEAD = 1
 # Size of a sector in bytes
 SECTOR_SIZE = 512
 
-class PartitionedMount(Mount):
+class PartitionedMount:
     def __init__(self, mountdir):
-        Mount.__init__(self, mountdir)
         self.disks = {}
         self.partitions = []
         self.mountOrder = []
@@ -316,7 +315,6 @@  class PartitionedMount(Mount):
         self.unmountOrder.reverse()
 
     def cleanup(self):
-        Mount.cleanup(self)
         if self.disks:
             for dev in self.disks.keys():
                 d = self.disks[dev]