[PATCH] Fix setupDiskImages when the devices are already in the tree.
Vratislav Podzimek
vpodzime at redhat.com
Tue Nov 18 08:02:58 UTC 2014
On Mon, 2014-11-17 at 13:36 -0600, David Lehman wrote:
> ---
> blivet/devicetree.py | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/blivet/devicetree.py b/blivet/devicetree.py
> index 7f3f73a..719fcf8 100644
> --- a/blivet/devicetree.py
> +++ b/blivet/devicetree.py
> @@ -1975,6 +1975,13 @@ class DeviceTree(object):
> """ Set up devices to represent the disk image files. """
> for (name, path) in self.diskImages.items():
> log.info("setting up disk image file '%s' as '%s'", path, name)
> + dmdev = self.getDeviceByName(name)
> + if dmdev and isinstance(dmdev, DMLinearDevice) and \
> + path in (d.path for d in dmdev.ancestors):
> + log.debug("using %s", dmdev)
> + dmdev.setup()
> + continue
> +
> try:
> filedev = FileDevice(path, exists=True)
> filedev.setup()
Looks good to me.
--
Vratislav Podzimek
Anaconda Rider | RHCE | Red Hat, Inc. | Brno - Czech Republic
More information about the anaconda-patches
mailing list