summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2001-07-30 22:56:01 +0000
committerJeremy Katz <katzj@redhat.com>2001-07-30 22:56:01 +0000
commita5c7ccbcb7b41f44d26c3f4d0efba74d973499f9 (patch)
tree682168722bda648535e5764528b6634d0a99a89f
parent50fff494de5f04c534bf1ec2c58c21f6b49a6cfd (diff)
downloadanaconda-a5c7ccbcb7b41f44d26c3f4d0efba74d973499f9.tar.gz
anaconda-a5c7ccbcb7b41f44d26c3f4d0efba74d973499f9.tar.xz
anaconda-a5c7ccbcb7b41f44d26c3f4d0efba74d973499f9.zip
register the wait window with the fsset so we can pop up a "Checking for badanaconda-s390-tag
blocks" window
-rw-r--r--fsset.py18
-rwxr-xr-xgui.py1
-rw-r--r--text.py1
3 files changed, 18 insertions, 2 deletions
diff --git a/fsset.py b/fsset.py
index f6db3b900..56feac6fa 100644
--- a/fsset.py
+++ b/fsset.py
@@ -136,13 +136,23 @@ class FileSystemType:
def registerDeviceArgumentFunction(self, klass, function):
self.deviceArguments[klass] = function
- def badblocksDevice(self, entry, progress, chroot='/'):
+ def badblocksDevice(self, entry, windowCreator, chroot='/'):
+ if windowCreator:
+ w = windowCreator(_("Checking for Bad Blocks"),
+ _("Checking for bad blocks on /dev/%s...")
+ % (entry.device.getDevice(),))
+ else:
+ w = None
+
devicePath = entry.device.setupDevice(chroot)
args = [ "badblocks", "-vv", devicePath ]
rc = iutil.execWithRedirect("/usr/sbin/badblocks", args,
stdout = "/dev/tty5",
stderr = "/dev/tty5")
+
+ w and w.pop()
+
if rc:
raise SystemError
@@ -464,6 +474,7 @@ class FileSystemSet:
def __init__(self):
self.messageWindow = None
self.progressWindow = None
+ self.waitWindow = None
self.mountcount = 0
self.reset()
@@ -476,6 +487,9 @@ class FileSystemSet:
def registerProgressWindow(self, method):
self.progressWindow = method
+ def registerWaitWindow(self, method):
+ self.waitWindow = method
+
def reset (self):
self.entries = []
proc = FileSystemSetEntry(Device(), '/proc', fileSystemTypeGet("proc"))
@@ -734,7 +748,7 @@ class FileSystemSet:
entry.fsystem.formatDevice(entry, self.progressWindow, chroot)
def badblocksEntry(self, entry, chroot):
- entry.fsystem.badblocksDevice(entry, self.progressWindow, chroot)
+ entry.fsystem.badblocksDevice(entry, self.waitWindow, chroot)
def getMigratableEntries(self):
retval = []
diff --git a/gui.py b/gui.py
index 880b9741c..66f782e37 100755
--- a/gui.py
+++ b/gui.py
@@ -340,6 +340,7 @@ class InstallInterface:
id.fsset.registerMessageWindow(self.messageWindow)
id.fsset.registerProgressWindow(self.progressWindow)
+ id.fsset.registerWaitWindow(self.waitWindow)
parted.exception_set_handler(partedExceptionWindow)
lang = id.instLanguage.getCurrent()
diff --git a/text.py b/text.py
index dd1dc372e..2da2d2016 100644
--- a/text.py
+++ b/text.py
@@ -341,6 +341,7 @@ class InstallInterface:
id.fsset.registerMessageWindow(self.messageWindow)
id.fsset.registerProgressWindow(self.progressWindow)
+ id.fsset.registerWaitWindow(self.waitWindow)
parted.exception_set_handler(self.partedExceptionWindow)
lastrc = INSTALL_OK