Author: fehr Date: Thu Apr 8 16:31:36 2010 New Revision: 61620 URL: http://svn.opensuse.org/viewcvs/yast?rev=61620&view=rev Log: backport fixes from head to fix bnc #592197 increase version to 2.17.97 Modified: branches/SuSE-Code-11-SP1-Branch/storage/VERSION branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/EtcFstab.cc branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/Volume.cc branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/Volume.h branches/SuSE-Code-11-SP1-Branch/storage/package/yast2-storage.changes Modified: branches/SuSE-Code-11-SP1-Branch/storage/VERSION URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/storage/VERSION?rev=61620&r1=61619&r2=61620&view=diff ============================================================================== --- branches/SuSE-Code-11-SP1-Branch/storage/VERSION (original) +++ branches/SuSE-Code-11-SP1-Branch/storage/VERSION Thu Apr 8 16:31:36 2010 @@ -1 +1 @@ -2.17.96 +2.17.97 Modified: branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/EtcFstab.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/EtcFstab.cc?rev=61620&r1=61619&r2=61620&view=diff ============================================================================== --- branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/EtcFstab.cc (original) +++ branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/EtcFstab.cc Thu Apr 8 16:31:36 2010 @@ -172,7 +172,7 @@ list<string>::iterator li = p->old.opts.begin(); while( li != p->old.opts.end() ) { - if( *li == "noauto" ) + if( *li == "noauto" || *li == "nofail" ) li = p->old.opts.erase(li); else ++li; @@ -509,13 +509,19 @@ ls.push_back( Volume::encTypeString(e.encr) ); } ls.push_back( mergeString( e.opts, "," ) ); - if( (e.dmcrypt&&e.mount!="swap") && - find( e.opts.begin(), e.opts.end(), "noauto" )==e.opts.end() ) + if( e.dmcrypt && e.mount!="swap" ) { - if( ls.back() == "defaults" ) - ls.back() = "noauto"; - else - ls.back() += ",noauto"; + if( find( e.opts.begin(), e.opts.end(), "noauto" )==e.opts.end() ) + { + if( ls.back() == "defaults" ) + ls.back() = "noauto"; + else + ls.back() += ",noauto"; + } + if( find( e.opts.begin(), e.opts.end(), "nofail" )==e.opts.end() ) + { + ls.back() += ",nofail"; + } } if( !e.cryptotab ) { Modified: branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/Volume.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/Volume.cc?rev=61620&r1=61619&r2=61620&view=diff ============================================================================== --- branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/Volume.cc (original) +++ branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/Volume.cc Thu Apr 8 16:31:36 2010 @@ -2486,6 +2486,30 @@ return( encryption==ENC_LUKS && getUsedByType()==UB_LVM ); } +bool Volume::noFreqPassno() const + { + return( fs==SWAP || fs==NFS || fs==VFAT || fs==NTFS || + fs==FSUNKNOWN || is_loop || optNoauto() ); + } + +unsigned Volume::fstabFreq() const + { + unsigned ret = 1; + if( noFreqPassno() || encryption!=ENC_NONE ) + ret = 0; + return ret; + } + +unsigned Volume::fstabPassno() const + { + unsigned ret = 2; + if( noFreqPassno() || (encryption!=ENC_NONE&&!dmcrypt()) ) + ret = 0; + else if( mp=="/" ) + ret = 1; + return( ret ); + } + int Volume::doFstabUpdate() { int ret = 0; @@ -2545,13 +2569,8 @@ { changed = true; che.fs = fs_names[fs]; - if( fs==SWAP || fs==NFS || encryption!=ENC_NONE ) - che.freq = che.passno = 0; - else - { - che.freq = 1; - che.passno = (mp=="/") ? 1 : 2; - } + che.freq = fstabFreq(); + che.passno = fstabPassno(); } if( encryption != orig_encryption ) { @@ -2563,13 +2582,8 @@ che.loop_dev = fstab_loop_dev; } che.dentry = de; - if( encryption!=ENC_NONE ) - che.freq = che.passno = 0; - else - { - che.freq = 1; - che.passno = (mp=="/") ? 1 : 2; - } + che.freq = fstabFreq(); + che.passno = fstabPassno(); } if( changed ) { @@ -2602,12 +2616,8 @@ che.fs = fs_names[fs]; getFstabOpts( che.opts ); che.mount = mp; - if( fs != NFS && fs != SWAP && fs != FSUNKNOWN && fs != NTFS && - fs != VFAT && !is_loop && !dmcrypt() && !optNoauto() ) - { - che.freq = 1; - che.passno = (mp=="/") ? 1 : 2; - } + che.freq = fstabFreq(); + che.passno = fstabPassno(); if( !silent() ) { cont->getStorage()->showInfoCb( Modified: branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/Volume.h URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/Volume.h?rev=61620&r1=61619&r2=61620&view=diff ============================================================================== --- branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/Volume.h (original) +++ branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/Volume.h Thu Apr 8 16:31:36 2010 @@ -119,6 +119,8 @@ storage::MountByType getMountBy() const { return mount_by; } const string& getFstabOption() const { return fstab_opt; } void setFstabOption( const string& val ) { orig_fstab_opt=fstab_opt=val; } + unsigned fstabFreq() const; + unsigned fstabPassno() const; void setMount( const string& val ) { orig_mp=mp=val; } void updateFstabOptions(); bool needFstabUpdate() const; @@ -254,6 +256,7 @@ int cryptUnsetup( bool force=false ); bool pwdLengthOk( storage::EncryptType typ, const string& val, bool format ) const; + bool noFreqPassno() const; std::ostream& logVolume( std::ostream& file ) const; string getLosetupCmd( storage::EncryptType, const string& pwdfile ) const; Modified: branches/SuSE-Code-11-SP1-Branch/storage/package/yast2-storage.changes URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/storage/package/yast2-storage.changes?rev=61620&r1=61619&r2=61620&view=diff ============================================================================== --- branches/SuSE-Code-11-SP1-Branch/storage/package/yast2-storage.changes (original) +++ branches/SuSE-Code-11-SP1-Branch/storage/package/yast2-storage.changes Thu Apr 8 16:31:36 2010 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Thu Apr 8 16:00:19 CEST 2010 - fehr@suse.de + +- backport fixes from head to fix (bnc #592197) +- 2.17.97 + +------------------------------------------------------------------- Mon Mar 29 16:08:36 CEST 2010 - aschnell@suse.de - enable XFS on S390 (bnc #591846) -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org