[yast-commit] r59244 - /branches/tmp/mpatelcz/SP1-md/libstorage/src/Storage.cc
Author: mpatelcz Date: Thu Oct 29 16:39:04 2009 New Revision: 59244 URL: http://svn.opensuse.org/viewcvs/yast?rev=59244&view=rev Log: discoverMdPVols was modified to provide more information in callback. Modified: branches/tmp/mpatelcz/SP1-md/libstorage/src/Storage.cc Modified: branches/tmp/mpatelcz/SP1-md/libstorage/src/Storage.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mpatelcz/SP1-md/libstorage/src/Storage.cc?rev=59244&r1=59243&r2=59244&view=diff ============================================================================== --- branches/tmp/mpatelcz/SP1-md/libstorage/src/Storage.cc (original) +++ branches/tmp/mpatelcz/SP1-md/libstorage/src/Storage.cc Thu Oct 29 16:39:04 2009 @@ -399,10 +399,11 @@ void Storage::dispatchMdDevs(list<string>& inList, list<string>& mdpList) { + y2mil(" called "); mdpList.clear(); for( list<string>::const_iterator i=inList.begin(); i!=inList.end(); ++i ) { - y2mil("Container: " << *i); + y2mil(" Element: " << *i); if( instsys() ) { // 1. With Partition Table @@ -430,13 +431,13 @@ // Detect MD Partitionable Volumes. void Storage::detectMdParts(ProcPart& ppart) { + y2mil(" called "); //In install/upgrade mode permission is needed to detect MD devices. if( instsys() == true && MdPartCo::isHandlingDev() == false ) { return; } - y2mil("Called"); if( testmode() ) { string file = testdir()+"/md"; @@ -463,6 +464,7 @@ i != mdpartlist.end(); i++) { + y2mil(" Md Part Co :" << *i); MdPartCo * v = new MdPartCo( this, *i, &ppart ); if( v->isValid() ) { @@ -513,9 +515,13 @@ return false; } string mdDevs = ""; + string partedDevs = ""; + string nonFSDevs = ""; bool ret = MdPartCo::isMdPlatform(); if( ret == true ) { + y2mil(" This is a Intel SW RAID Platform"); + y2mil(" Activating Md subsystem."); MdPartCo::activate( true, tmpDir() ); waitForDevice(); @@ -525,42 +531,78 @@ { // At least ONE Volume must be detected mdDevs.clear(); + partedDevs.clear(); + nonFSDevs.clear(); for( list<string>::const_iterator i=l.begin(); i!=l.end(); ++i ) { - // Detection will be in detectMdPart! - //if( MdPartCo::hasPartitionTable(*i) || MdPartCo::hasFileSystem(*i) ) - // { - mdDevs += " " + *i; - // } + if( MdPartCo::hasPartitionTable(*i) ) + { + //Has a PT + partedDevs += (" " + *i); + } + else if ( MdPartCo::hasFileSystem(*i) == false ) + { + // Doesn't have FS + nonFSDevs += (" " + *i); + } + mdDevs += " " + *i; } + y2mil(" md raids:" + mdDevs); + y2mil(" md raids with partition table :" + partedDevs); + y2mil(" md raids no partition table and no FS :" + nonFSDevs); if( !mdDevs.empty()) { + string s1; + string s2; + if( !partedDevs.empty() ) + { + // add string + s1 = sformat( + _("Devices:\n" + "%1$s\n" + "have partition table.\n"),partedDevs.c_str()); + } + else + { + s1.clear(); + } + if( !nonFSDevs.empty() ) + { + s2 = sformat( + _("Devices:\n" + "%1$s\n" + "don't have either Partition Table nor Filesystem.\n" + "You can create partition on them and install Operating\n" + "System on selected partitions.\n"),nonFSDevs.c_str()); + } + else + { + s2.clear(); + } //FIXME: callback, info and decision. string txt = sformat( // popup text %1$s is replaced by disk name e.g. /dev/hda - - //FIXME: Make decent description. Suggest to user MD for installation. _("You are running on the Intel(R) Matrix Storage Manager compatible platform.\n" "\n" - "Following IMSM Partitionable RAID Volumes were detected on your system:\n" - "%1Ss\n" - "\n" - "You can choose to treat them as MD Partitionable devices.\n " - "It means that you will be able to create partitions on those Volumes and \n" - "install system on it.\n" - "After installation remember to set in BIOS to boot from RAID Volume into" - "which you created partitions and installed system." + "Following MD compatibible RAID devices were detected:\n" + "%1$s\n" + "%2$s" + "%3$s" "\n" - "Do you want to treat them as Partitionable RAID Volumes?" - ), mdDevs.c_str() ); + "Do you want MD Partitionable subsystem to manage those partitions?" + ), mdDevs.c_str(),s1.c_str(),s2.c_str() ); + y2mil(" Asking user:"); + y2mil("" + txt); if( yesnoPopupCb(txt) ) { + y2mil(" YES - In this mode MD PART is handling MD Devices"); ret = true; MdPartCo::setHandlingDev(true); } else { + y2mil(" NO - not handling MD Devices"); MdPartCo::setHandlingDev(false); //User said 'No' - switch off MD. MdPartCo::activate( false, "" ); @@ -582,6 +624,7 @@ } // Get RAIDs } + y2mil(" Exiting with status: " << ret); return ret; } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
mpatelcz@svn.opensuse.org