Mailinglist Archive: yast-commit (190 mails)

< Previous Next >
[yast-commit] r38104 - in /trunk/storage: VERSION libstorage/src/Disk.cc package/yast2-storage.changes storage/src/modules/Storage.ycp
  • From: fehr@xxxxxxxxxxxxxxxx
  • Date: Wed, 23 May 2007 11:08:25 -0000
  • Message-id: <20070523110826.18D7B4808F@xxxxxxxxxxxxxxxx>
Author: fehr
Date: Wed May 23 13:08:25 2007
New Revision: 38104

URL: http://svn.opensuse.org/viewcvs/yast?rev=38104&view=rev
Log:
- handle very small devices where parted detects number of cylinders as zero (#275959)
- version 2.15.13 

Modified:
    trunk/storage/VERSION
    trunk/storage/libstorage/src/Disk.cc
    trunk/storage/package/yast2-storage.changes
    trunk/storage/storage/src/modules/Storage.ycp

Modified: trunk/storage/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/VERSION?rev=38104&r1=38103&r2=38104&view=diff
==============================================================================
--- trunk/storage/VERSION (original)
+++ trunk/storage/VERSION Wed May 23 13:08:25 2007
@@ -1 +1 @@
-2.15.12
+2.15.13

Modified: trunk/storage/libstorage/src/Disk.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Disk.cc?rev=38104&r1=38103&r2=38104&view=diff
==============================================================================
--- trunk/storage/libstorage/src/Disk.cc (original)
+++ trunk/storage/libstorage/src/Disk.cc Wed May 23 13:08:25 2007
@@ -346,11 +346,16 @@
     list<string> geo = splitString( extractNthWord( 0, tmp ), "," );
     list<string>::const_iterator i = geo.begin();
     unsigned long val = 0;
+    bool sect_head_changed = false;
+    bool cyl_changed = false;
     if( i!=geo.end() )
        {
        *i >> val;
        if( val>0 )
+           {
            c = val;
+           cyl_changed = true;
+           }
        }
     ++i;
     val = 0;
@@ -358,7 +363,10 @@
        {
        *i >> val;
        if( val>0 )
+           {
            h = (unsigned)val;
+           sect_head_changed = true;
+           }
        }
     ++i;
     val = 0;
@@ -366,7 +374,17 @@
        {
        *i >> val;
        if( val>0 )
+           {
            s = (unsigned)val;
+           sect_head_changed = true;
+           }
+       }
+    if( !cyl_changed && sect_head_changed )
+       {
+       c = sizeK()*2/(s*h);
+       if( c<=0 )
+           c=1;
+       y2mil( "new c:" << c );
        }
     y2milestone( "line:%s", line.c_str() );
     y2milestone( "c:%lu h:%u s:%u", c, h, s );

Modified: trunk/storage/package/yast2-storage.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/package/yast2-storage.changes?rev=38104&r1=38103&r2=38104&view=diff
==============================================================================
--- trunk/storage/package/yast2-storage.changes (original)
+++ trunk/storage/package/yast2-storage.changes Wed May 23 13:08:25 2007
@@ -1,4 +1,11 @@
 -------------------------------------------------------------------
+Mon May 21 12:24:12 CEST 2007 - fehr@xxxxxxx
+
+- handle very small devices where parted detects number of cylinders
+  as zero (#275959)
+- version 2.15.13 
+
+-------------------------------------------------------------------
 Wed May 16 13:08:06 CEST 2007 - fehr@xxxxxxx
 
 - add text about not moving progress bar when resizing (#274720)

Modified: trunk/storage/storage/src/modules/Storage.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/modules/Storage.ycp?rev=38104&r1=38103&r2=38104&view=diff
==============================================================================
--- trunk/storage/storage/src/modules/Storage.ycp (original)
+++ trunk/storage/storage/src/modules/Storage.ycp Wed May 23 13:08:25 2007
@@ -3329,7 +3329,7 @@
            foreach( string dev, map disk, tmp,
                ``{
                disk = getDiskInfo( dev, disk );
-               integer s = disk["cyl_count"]:0 * disk["cyl_size"]:0;
+               integer s = disk["size_k"]:0 * 1024;
                disk["name"] = disk["dname"]:"" +
                   Partitions::ByteToHumanString( s ) + ", " +
                   disk["device"]:"" + ", ";

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages