Author: aschnell Date: Thu Apr 10 11:13:26 2008 New Revision: 46324 URL: http://svn.opensuse.org/viewcvs/yast?rev=46324&view=rev Log: - added checkbox to disable ext3 mount checks (fate #302118) Modified: trunk/storage/VERSION trunk/storage/package/yast2-storage.changes trunk/storage/storage/src/include/custom_part_dialogs.ycp trunk/storage/storage/src/modules/FileSystems.ycp trunk/storage/storage/src/modules/Storage.ycp Modified: trunk/storage/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/VERSION?rev=46324&r1=... ============================================================================== --- trunk/storage/VERSION (original) +++ trunk/storage/VERSION Thu Apr 10 11:13:26 2008 @@ -1 +1 @@ -2.16.16 +2.16.17 Modified: trunk/storage/package/yast2-storage.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/package/yast2-storage.cha... ============================================================================== --- trunk/storage/package/yast2-storage.changes (original) +++ trunk/storage/package/yast2-storage.changes Thu Apr 10 11:13:26 2008 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Wed Apr 09 19:21:25 CEST 2008 - aschnell@suse.de + +- added checkbox to disable ext3 mount checks (fate #302118) +- version 2.16.17 + +------------------------------------------------------------------- Tue Apr 08 17:13:38 CEST 2008 - aschnell@suse.de - added filesystem label in one of the proposal screens Modified: trunk/storage/storage/src/include/custom_part_dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/custo... ============================================================================== --- trunk/storage/storage/src/include/custom_part_dialogs.ycp (original) +++ trunk/storage/storage/src/include/custom_part_dialogs.ycp Thu Apr 10 11:13:26 2008 @@ -413,6 +413,7 @@ y2milestone( "FileSystemOptions query %1", query ); map<string,any> fs_option = $[ "option_str" : entry[`option_str]:"", + "option_cmd" : entry[`option_cmd]:`mkfs, "option_value" : query ]; y2milestone( "FileSystemOptions fs_option %1", fs_option ); Modified: trunk/storage/storage/src/modules/FileSystems.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/modules/FileS... ============================================================================== --- trunk/storage/storage/src/modules/FileSystems.ycp (original) +++ trunk/storage/storage/src/modules/FileSystems.ycp Thu Apr 10 11:13:26 2008 @@ -608,6 +608,18 @@ // xgettext: no-c-format // help text, richtext format `help_text : _("<p><b>Percentage of blocks reserved for root:</b> Specify the percentage of blocks reserved for the super user. This value defaults to 5%.</p>") + ], + $[ + // checkbox text + `widget : `CheckBox(`id("opt_reg_checks"), `opt(`hstretch), _("Disable regular checks")), + `query_key : "opt_reg_checks", + `option_str : "-c 0 -i 0", + `option_cmd : `tunefs, + `type : `boolean, + `default : false, + // help text, richtext format + `help_text : _("<p><b>Disable regular checks:</b> +Disable regular file system check at booting.</p>\n") ] ]; @@ -1438,27 +1450,32 @@ return( fst_default ); } -global define map DefaultFormatOptions( map part ) - ``{ +global map DefaultFormatOptions( map part ) +{ map ret = $[]; symbol fsys = part["used_fs"]:`none; if( part["format"]:false ) - { + { if( fsys==`ext3 ) - { - ret["opt_dir_index"] = $[ "option_str":"-O dir_index", - "option_value":true ]; - } + { + ret["opt_bytes_per_inode"] = $[ "option_str" : "-I", + "option_value" : "128" ]; + ret["opt_dir_index"] = $[ "option_str" : "-O dir_index", + "option_value" : true ]; + ret["opt_reg_checks"] = $[ "option_str" : "-c 0 -i 0", + "option_value" : true, + "option_cmd" : `tunefs ]; + } if( Arch::s390() && contains( [`ext2, `ext3], fsys ) ) - { - ret["opt_blocksize"] = $[ "option_str":"-b", - "option_value":"4096" ]; - } + { + ret["opt_blocksize"] = $[ "option_str" : "-b", + "option_value" : "4096" ]; } + } y2milestone( "DefaultFormatOptions fsys %1 fmt %2 is %3", fsys, part["format"]:false, ret ); - return( ret ); - } + return ret; +} global define boolean HasFstabOption( map part, string opt, boolean prefix ) { Modified: trunk/storage/storage/src/modules/Storage.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/modules/Stora... ============================================================================== --- trunk/storage/storage/src/modules/Storage.ycp (original) +++ trunk/storage/storage/src/modules/Storage.ycp Thu Apr 10 11:13:26 2008 @@ -1076,7 +1076,7 @@ return( target ); } -define string convertFsOptionMapToString( map<any,map> fsopt ) +string convertFsOptionMapToString( map<any, map> fsopt, symbol cmd ) { string ret = ""; @@ -1090,9 +1090,12 @@ string option_str = option["option_str"]:""; any option_value = option["option_value"]:(any)""; boolean option_blank = option["option_blank"]:false; - y2milestone( "convertFsOptionMapToString k:%1 opt:%2 val:%3", - option_key, option, option_value ); + symbol option_cmd = option["option_cmd"]:`mkfs; + y2milestone( "convertFsOptionMapToString k:%1 opt:%2 val:%3 cmd:%4", + option_key, option, option_value, option_cmd ); + if (cmd == option_cmd) + { if( is(option_value, string) && option_value != nil ) { if( !contains( ignore, option_value )) @@ -1123,6 +1126,7 @@ ret = ret + " "; ret = ret + sformat("%1", option_value); } + } }); } if( size(fsopt)>0 || size(ret)>0 ) @@ -1130,14 +1134,17 @@ return ret; }; -map convertStringToFsOptionMap( string opts, symbol fs ) +map<any, map> convertStringToFsOptionMap( string opts, symbol fs, symbol cmd ) { - map ret = $[]; - y2milestone( "convertStringToFsOptionMap opts:"%1" fs:%2", opts, fs ); + map<any, map> ret = $[]; + y2milestone( "convertStringToFsOptionMap opts:"%1" fs:%2 cmd:%3", opts, fs, cmd ); integer pos = findfirstnotof( opts, " \t" ); if( pos>0 ) opts = substring( opts, pos ); + list<map> op = (list<map>)FileSystems::GetOptions(fs); + op = filter(map o, op, { return o[`option_cmd]:`mkfs == cmd; }); + while( size(opts)>0 ) { boolean found = false; @@ -1148,7 +1155,8 @@ if( !found && size(os)>0 && search( opts, os )==0 ) { found = true; - m["option_str"] = os; + m["option_str"] = os; + m["option_cmd"] = o[`option_cmd]:`mkfs; if( o[`type]:`text==`boolean ) { m["option_value"] = true; @@ -1309,13 +1317,20 @@ { p["mkfs_opt"] = tmp; p["fs_options"] = - convertStringToFsOptionMap( tmp, p["detected_fs"]:`unknown ); + convertStringToFsOptionMap( tmp, p["detected_fs"]:`unknown, `mkfs ); } else { if( haskey( p, "fs_options" )) p = remove( p, "fs_options" ); } + tmp = LibStorage::VolumeInfo::swig_tunefs_options_get(vinfo); + if( size(tmp)>0 ) + { + p["tunefs_opt"] = tmp; + p["fs_options"] = union(p["fs_options"]:$[], + convertStringToFsOptionMap( tmp, p["detected_fs"]:`unknown, `tunefs )); + } tmp = LibStorage::VolumeInfo::swig_dtxt_get(vinfo); if( size(tmp)>0 ) p["dtxt"] = tmp; @@ -2683,10 +2698,10 @@ y2milestone( "ChangeVolumeProperties sint ret:%1", ret ); } if( ret==0 && part["format"]:false && - convertFsOptionMapToString(part["fs_options"]:$[]) != curr["mkfs_opt"]:"" ) + convertFsOptionMapToString(part["fs_options"]:$[], `mkfs) != curr["mkfs_opt"]:"" ) { changed = true; - ts = convertFsOptionMapToString(part["fs_options"]:$[]); + ts = convertFsOptionMapToString(part["fs_options"]:$[], `mkfs); y2milestone( "FsOption ts:%1", ts ); ret = LibStorage::StorageInterface::changeMkfsOptVolume( sint, dev, ts ); if( ret<0 ) @@ -2694,6 +2709,18 @@ else y2milestone( "ChangeVolumeProperties sint ret:%1", ret ); } + if( ret==0 && part["format"]:false && + convertFsOptionMapToString(part["fs_options"]:$[], `tunefs) != curr["tunefs_opt"]:"" ) + { + changed = true; + ts = convertFsOptionMapToString(part["fs_options"]:$[], `tunefs); + y2milestone( "FsOption ts:%1", ts ); + ret = LibStorage::StorageInterface::changeTunefsOptVolume( sint, dev, ts ); + if( ret<0 ) + y2error( "ChangeVolumeProperties sint ret:%1", ret ); + else + y2milestone( "ChangeVolumeProperties sint ret:%1", ret ); + } if( ret==0 && part["enc_type"]:`none != `none && haskey( ClassifiedSettings, dev ) ) { @@ -4035,7 +4062,7 @@ if( size(fs_opts)>0 ) ret["fs_options"] = - convertStringToFsOptionMap( fs_opts, ret["used_fs"]:`unknown ); + convertStringToFsOptionMap( fs_opts, ret["used_fs"]:`unknown, `mkfs ); else ret["fs_options"] = FileSystems::DefaultFormatOptions( ret ); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org