Author: aschnell
Date: Thu Jul 16 11:50:21 2009
New Revision: 58067
URL: http://svn.opensuse.org/viewcvs/yast?rev=58067&view=rev
Log:
- use new getPartitionName() from libstorage
Modified:
trunk/storage/package/yast2-storage.changes
trunk/storage/storage/src/modules/Storage.ycp
trunk/storage/yast2-storage.spec.in
Modified: trunk/storage/package/yast2-storage.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/package/yast2-storage.changes?rev=58067&r1=58066&r2=58067&view=diff
==============================================================================
--- trunk/storage/package/yast2-storage.changes (original)
+++ trunk/storage/package/yast2-storage.changes Thu Jul 16 11:50:21 2009
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Thu Jul 16 11:06:24 CEST 2009 - aschnell@suse.de
+
+- use new getPartitionName() from libstorage
+- 2.18.15
+
+-------------------------------------------------------------------
Tue Jul 14 16:55:28 CEST 2009 - aschnell@suse.de
- replaced Recommends in yast2-storage with Supplements in
Modified: trunk/storage/storage/src/modules/Storage.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/modules/Storage.ycp?rev=58067&r1=58066&r2=58067&view=diff
==============================================================================
--- trunk/storage/storage/src/modules/Storage.ycp (original)
+++ trunk/storage/storage/src/modules/Storage.ycp Thu Jul 16 11:50:21 2009
@@ -184,43 +184,6 @@
string part_insts = "";
- /**
- * Returns Device Name
- *
- * @param string Disk
- * @param any partition
- * @return string device name
- *
- * @example Storage::GetDeviceName ("/dev/md", 1)
- */
-global define string GetDeviceName( string disk, any partition )
- {
- string ret = disk;
-
- if( is( partition, integer ) )
- {
- if( search( disk, "/dev/cciss/" )==0 ||
- search( disk, "/dev/ida/" )==0 ||
- search( disk, "/dev/ataraid/" )==0 ||
- search( disk, "/dev/etherd/" )==0 ||
- search( disk, "/dev/rd/" )==0 )
- {
- ret = ret + "p";
- }
- else if( search( disk, "/dev/mapper/" )==0 )
- {
- ret = ret + "_part";
- }
- ret = ret + sformat( "%1", partition );
- }
- else if( size( (string)partition )>0 )
- {
- ret = ret + "/" + (string)partition;
- }
- return( ret );
- };
-
-
global boolean IsKernelDeviceName(string device)
{
return substring(device, 0, 6) != "LABEL=" &&
@@ -445,6 +408,31 @@
}
+ /**
+ * Returns Device Name
+ *
+ * @param string Disk
+ * @param any partition
+ * @return string device name
+ *
+ * @example Storage::GetDeviceName("/dev/md", 1)
+ * @example Storage::GetDeviceName("/dev/system", "root")
+ */
+ global string GetDeviceName(string disk, any partition)
+ {
+ string ret = disk;
+ if (is(partition, integer))
+ {
+ ret = LibStorage::StorageInterface::getPartitionName(sint, disk, (integer) partition);
+ }
+ else if (size((string) partition ) > 0)
+ {
+ ret = ret + "/" + (string) partition;
+ }
+ return ret;
+ }
+
+
global define map