Re: [PATCH 3/4] Do not run wipefs if the device node does not exist (#693764)

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

 



On Tue, 2011-04-19 at 13:05 -1000, David Cantrell wrote:
> ---
>  pyanaconda/storage/formats/__init__.py |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)

The fact that the device node does not exist is a real problem, no? In
bug 693764 we've just created a partition and committed the partition
table, so there's no reason the device node should not exist.

Dave

> 
> diff --git a/pyanaconda/storage/formats/__init__.py b/pyanaconda/storage/formats/__init__.py
> index 9336c89..ce4fc8f 100644
> --- a/pyanaconda/storage/formats/__init__.py
> +++ b/pyanaconda/storage/formats/__init__.py
> @@ -283,6 +283,11 @@ class DeviceFormat(object):
>      def destroy(self, *args, **kwargs):
>          log_method_call(self, device=self.device,
>                          type=self.type, status=self.status)
> +
> +        if not os.path.exists(self.device):
> +            self.exists = False
> +            return
> +
>          try:
>              rc = execWithRedirect("wipefs", ["-a", self.device],
>                                    stderr="/dev/tty5",
> @@ -415,6 +420,9 @@ class DeviceFormat(object):
>              except DMError:
>                  device = self.device
>  
> +            if not os.access(device, os.R_OK):
> +                return None
> +
>              sysfs_path = get_sysfs_path_by_name(device)
>              dev = udev_get_device(sysfs_path[4:])
>  


_______________________________________________
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