FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Kernel

 
 
LinkBack Thread Tools
 
Old 04-19-2011, 11:05 PM
David Cantrell
 
Default Do not run wipefs if the device node does not exist (#693764)

---
pyanaconda/storage/formats/__init__.py | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)

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:])

--
1.7.1

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

Thread Tools




All times are GMT. The time now is 04:38 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org