partitionedfs: save the mapper device path
authorArtem Bityutskiy <artem.bityutskiy@intel.com>
Fri, 27 Sep 2013 07:40:34 +0000 (10:40 +0300)
committerGerrit Code Review <gerrit2@otctools.jf.intel.com>
Mon, 21 Oct 2013 03:34:32 +0000 (20:34 -0700)
For some legacy reasons related to grub, which we do not use, MIC creates
/dev/loopXpY files which are symlinks to the real /dev/mapper/loopXpY device
node files. Then MIC saves the /dev/loopXpY path in the internal data
structure, and drps the mapper device path.

This patch makes MIC also save the /dev/mapper/loopXpY in the internal data
structures for firther use. We'll use it later for creating a copy of device
nodes in the target image. Thede device nodes will be later used by installer
framework plugins.

Change-Id: Ia928669ffd40a8fbda472d2f9d9890053aa94f67
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
mic/utils/partitionedfs.py

index d745bb9..e676a8a 100644 (file)
@@ -438,6 +438,7 @@ class PartitionedMount(Mount):
                 msger.debug("Dev %s: %s -> %s" % (newdev, loopdev, mapperdev))
                 pnum = d['partitions'][i]
                 self.partitions[pnum]['device'] = loopdev
+                self.partitions[pnum]['mapper_device'] = mapperdev
 
                 # grub's install wants partitions to be named
                 # to match their parent device + partition num