def checkDasdFmt(disk, intf): if iutil.getArch() != "s390": return 0 if disk.type.name != "dasd": return 0 # FIXME: there has to be a better way to check LDL vs CDL # how do I test ldl vs cdl? if disk.max_primary_partition_count > 1: return 0 if intf: try: devs = isys.getDasdDevPort() dev = "/dev/%s (%s" %(disk.dev.path[5:], devs[device]) except Exception, e: log("exception getting dasd dev ports: %s" %(e,)) dev = "/dev/%s" %(disk.dev.path[5:],) rc = intf.messageWindow(_("Warning"), _("The device %s is LDL formatted instead of " "CDL formatted. LDL formatted DASDs are not " "supported for usage during an install of %s. " "If you wish to use this disk for installation, " "it must be re-initialized causing the loss of " "ALL DATA on this drive.\n\n" "Would you like to reformat this DASD using CDL " "format?") %(dev, productName), type = "yesno") if rc == 0: return 1 else: return -1