[yast-commit] r67739 - in /trunk/storage: package/yast2-storage.changes storage/src/include/custom_part_dialogs.ycp storage/src/modules/FileSystems.ycp
Author: fehr Date: Thu Mar 29 12:30:00 2012 New Revision: 67739 URL: http://svn.opensuse.org/viewcvs/yast?rev=67739&view=rev Log: prevent invalid size values in tmpfs size (bnc#754326) Modified: trunk/storage/package/yast2-storage.changes trunk/storage/storage/src/include/custom_part_dialogs.ycp trunk/storage/storage/src/modules/FileSystems.ycp 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 Mar 29 12:30:00 2012 @@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Thu Mar 29 12:14:35 CEST 2012 - fehr@suse.de + +- prevent invalid size values in tmpfs size (bnc#754326) + +------------------------------------------------------------------- Fri Mar 23 11:55:48 CET 2012 - aschnell@suse.de - hide instead of disable some unavailable fstab mount options 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 Mar 29 12:30:00 2012 @@ -227,7 +227,8 @@ } else if( pospct==nil && (!Storage::HumanStringToByte( query, sz ) || - sz<entry[`min_size]:1 )) + sz<entry[`min_size]:1 || + !regexpmatch( query, "^[0-9]+[KMGkmg]$"))) { Popup::Error(entry[`error_text]:""); ret = `error; @@ -255,20 +256,20 @@ ret = `error; } } - if( valid_chars != "" && size(query)>0 && ret != `error ) - { - if( nil != findfirstnotof( query, valid_chars )) - { - Popup::Error(entry[`error_text]:""); - ret = `error; - } - } if( str_length != 0 && size(query) > str_length && ret != `error ) { Popup::Error(entry[`error_text]:""); ret = `error; } } + if( valid_chars != "" && size(query)>0 && ret != `error ) + { + if( nil != findfirstnotof( query, valid_chars )) + { + Popup::Error(entry[`error_text]:""); + ret = `error; + } + } y2milestone( "DoInputChecks value %1 ret %2", query, ret ); return( ret ); } 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 Mar 29 12:30:00 2012 @@ -341,7 +341,7 @@ `min_size : 100*1024, `valid_chars : "0123456789kKmMgG%", // popup text - `error_text : _("Value must be above 100k or between 1% and 200%. Try again."), + `error_text : _("Invalid Size specified. Use number followed by K, M, G or %.\nValue must be above 100k or between 1% and 200%. Try again."), `error_text_percent : _("Value must be between 1% and 200%. Try again."), `type : `text, `str_opt : "size=%1", -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
fehr@svn2.opensuse.org