Author: fehr Date: Wed Jul 4 15:31:08 2007 New Revision: 39169 URL: http://svn.opensuse.org/viewcvs/yast?rev=39169&view=rev Log: increase overwritten area at start and end of partitions Modified: trunk/storage/libstorage/src/Disk.cc trunk/storage/libstorage/src/Volume.cc Modified: trunk/storage/libstorage/src/Disk.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Disk.cc?rev=39169&r1=39168&r2=39169&view=diff ============================================================================== --- trunk/storage/libstorage/src/Disk.cc (original) +++ trunk/storage/libstorage/src/Disk.cc Wed Jul 4 15:31:08 2007 @@ -2261,10 +2261,14 @@ SystemCmd c; cmd = "dd if=/dev/zero of=" + p->device() + " bs=1k count=200"; c.execute( cmd ); - cmd = "dd if=/dev/zero of=" + p->device() + - " seek=" + decString(p->sizeK()-10) + - " bs=1k count=10"; - c.execute( cmd ); + unsigned long long pos = p->sizeK(); + if( pos>200 ) + { + pos -= 200; + cmd = "dd if=/dev/zero of=" + p->device() + + " seek=" + decString(pos) + " bs=1k count=10"; + c.execute( cmd ); + } } else if( !dmp_slave && !p->getFormat() ) { Modified: trunk/storage/libstorage/src/Volume.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Volume.cc?rev=39169&r1=39168&r2=39169&view=diff ============================================================================== --- trunk/storage/libstorage/src/Volume.cc (original) +++ trunk/storage/libstorage/src/Volume.cc Wed Jul 4 15:31:08 2007 @@ -688,13 +688,13 @@ string cmd = "/bin/dd if="; cmd += (encryption!=ENC_NONE) ? "/dev/urandom" : "/dev/zero"; cmd += " of=" + mountDevice() + " bs=1024 count="; - cmd += decString(min(100ull,size_k)); + cmd += decString(min(200ull,size_k)); if( c.execute( cmd ) != 0 ) ret = VOLUME_FORMAT_DD_FAILED; ofstream s( mountDevice().c_str() ); ofstream::pos_type p = s.seekp( 0, ios_base::end ).tellp(); y2mil( "good:" << s.good() << " pos_type:" << p ); - const unsigned count=32; + const unsigned count=200; const unsigned bufsize=1024; if( s.good() && p>count*bufsize ) { -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org