Author: aschnell Date: Fri Dec 5 14:45:47 2008 New Revision: 53939 URL: http://svn.opensuse.org/viewcvs/yast?rev=53939&view=rev Log: - fixed creation of partitions on device-mapper devices (bnc #456615) Modified: trunk/storage/VERSION trunk/storage/libstorage/src/DmPartCo.cc trunk/storage/package/yast2-storage.changes Modified: trunk/storage/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/VERSION?rev=53939&r1=53938&r2=53939&view=diff ============================================================================== --- trunk/storage/VERSION (original) +++ trunk/storage/VERSION Fri Dec 5 14:45:47 2008 @@ -1 +1 @@ -2.17.60 +2.17.61 Modified: trunk/storage/libstorage/src/DmPartCo.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/DmPartCo.cc?rev=53939&r1=53938&r2=53939&view=diff ============================================================================== --- trunk/storage/libstorage/src/DmPartCo.cc (original) +++ trunk/storage/libstorage/src/DmPartCo.cc Fri Dec 5 14:45:47 2008 @@ -40,29 +40,39 @@ y2deb("destructed DmPart co " << dev); } -int DmPartCo::addNewDev( string& device ) - { + +int +DmPartCo::addNewDev(string& device) +{ int ret = 0; - unsigned number; - device.substr( dev.length() ) >> number; - y2mil( "device:" << device << " dev:" << dev << " num:" << number ); - device = "/dev/mapper/" + numToName(number); - Partition *p = getPartition( number, false ); - if( p==NULL ) + y2mil("device:" << device << " dev:" << dev); + string::size_type pos = device.rfind("_part"); + if (pos == string::npos) ret = DMPART_PARTITION_NOT_FOUND; else + { + unsigned number; + device.substr(pos + 5) >> number; + y2mil("num:" << number); + device = "/dev/mapper/" + numToName(number); + Partition *p = getPartition( number, false ); + if( p==NULL ) + ret = DMPART_PARTITION_NOT_FOUND; + else { - y2mil( "*p:" << *p ); - DmPart * dm = NULL; - newP( dm, p->nr(), p ); - dm->getFsInfo( p ); - dm->setCreated(); - addToList( dm ); + y2mil("*p:" << *p); + DmPart * dm = NULL; + newP( dm, p->nr(), p ); + dm->getFsInfo( p ); + dm->setCreated(); + addToList( dm ); } - handleWholeDevice(); - y2mil( "device:" << device << " ret:" << ret ); - return( ret ); + handleWholeDevice(); } + y2mil("device:" << device << " ret:" << ret); + return ret; +} + int DmPartCo::createPartition( storage::PartitionType type, long unsigned start, Modified: trunk/storage/package/yast2-storage.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/package/yast2-storage.changes?rev=53939&r1=53938&r2=53939&view=diff ============================================================================== --- trunk/storage/package/yast2-storage.changes (original) +++ trunk/storage/package/yast2-storage.changes Fri Dec 5 14:45:47 2008 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Fri Dec 05 13:08:14 CET 2008 - aschnell@suse.de + +- fixed creation of partitions on device-mapper devices (bnc + #456615) +- 2.17.61 + +------------------------------------------------------------------- Thu Dec 04 16:38:57 CET 2008 - aschnell@suse.de - marked string for translation -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org