Re: [Patch] be more specific about which device is about to be formatted (mainframe)

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

 



On Wed, Jun 16, 2004 at 01:23:15PM -0400, Jeremy Katz wrote:
> On Wed, 2004-06-16 at 17:37 +0200, Karsten Hopp wrote:
> > I almost formatted the $HOME disk of a VM guest because it showed up
> > as dasda in the dialog. This patch lists it as dasda(0191) instead.
> 
> This is probably reasonable given mainframe users.  But instead of your
> getDasdPort() implementation, you should just use the already existing
> isys.getDasdDevPort(dev).
> 

Hmm, that's too easy ;-)

    Karsten
--
 Karsten Hopp <karsten@xxxxxxxxx>   GPG 1024D/70ABD02C
 Fingerprint D2D4 3B6B 2DE4 464C A432 210A DFF8 A140 70AB D02C
 Red Hat Deutschland, Hauptstaetter Str.58
 70178 Stuttgart, Tel.+49-711-96437-0, Fax +49-711-96437-111
Index: partedUtils.py
===================================================================
RCS file: /usr/local/CVS/anaconda/partedUtils.py,v
retrieving revision 1.58
diff -u -r1.58 partedUtils.py
--- partedUtils.py	19 May 2004 04:09:10 -0000	1.58
+++ partedUtils.py	16 Jun 2004 18:19:23 -0000
@@ -803,8 +803,9 @@
                 continue
             # FIXME: need the right fix for z/VM formatted dasd
             if iutil.getArch() == "s390" and isys.getDasdState(drive):
+                devs = isys.getDasdDevPort()
                 rc = intf.messageWindow(_("Warning"),
-                        _("The partition table on device %s was unreadable. "
+                        _("The partition table on device %s (%s) was unreadable. "
                           "To create new partitions it must be initialized, "
                           "causing the loss of ALL DATA on this drive.\n\n"
                           "This operation will override any previous "
@@ -812,7 +813,7 @@
                           "ignore.\n\n"
                           "Would you like to initialize this drive, "
                           "erasing ALL DATA?")
-                                        % (drive,), type = "yesno")
+                                        % (drive, devs[drive]), type = "yesno")
                 if rc == 0:
                     DiskSet.skippedDisks.append(drive)
                     continue
@@ -855,6 +856,11 @@
                     DiskSet.skippedDisks.append(drive)
                     continue
                 else:
+                    if iutil.getArch() == "s390":
+                         devs = isys.getDasdDevPort()
+                         format = drive + " (" + devs[drive] + ")"
+                    else:
+                         format = drive
                     rc = intf.messageWindow(_("Warning"),
                              _("The partition table on device %s was unreadable. "
                                "To create new partitions it must be initialized, "
@@ -864,7 +870,7 @@
 			       "ignore.\n\n"
                                "Would you like to initialize this drive, "
 			       "erasing ALL DATA?")
-                                           % (drive,), type = "yesno")
+                                           % (format,), type = "yesno")
                     if rc == 0:
                         DiskSet.skippedDisks.append(drive)
                         continue

[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