Author: aschnell
Date: Wed Apr 16 10:59:47 2008
New Revision: 46700
URL: http://svn.opensuse.org/viewcvs/yast?rev=46700&view=rev
Log:
- check return value of SCR::Read(.proc.swaps) before processing it
Modified:
trunk/storage/package/yast2-storage.changes
trunk/storage/storage/src/modules/Storage.ycp
Modified: trunk/storage/package/yast2-storage.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/package/yast2-storage.changes?rev=46700&r1=46699&r2=46700&view=diff
==============================================================================
--- trunk/storage/package/yast2-storage.changes (original)
+++ trunk/storage/package/yast2-storage.changes Wed Apr 16 10:59:47 2008
@@ -1,4 +1,9 @@
-------------------------------------------------------------------
+Wed Apr 16 10:58:44 CEST 2008 - aschnell@suse.de
+
+- check return value of SCR::Read(.proc.swaps) before processing it
+
+-------------------------------------------------------------------
Tue Apr 15 17:05:18 CEST 2008 - aschnell@suse.de
- use default inode size on ext2/3 again (bnc #358483)
Modified: trunk/storage/storage/src/modules/Storage.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/modules/Storage.ycp?rev=46700&r1=46699&r2=46700&view=diff
==============================================================================
--- trunk/storage/storage/src/modules/Storage.ycp (original)
+++ trunk/storage/storage/src/modules/Storage.ycp Wed Apr 16 10:59:47 2008
@@ -714,17 +714,19 @@
* Get List of swap partitions
* @return list List of swap partitions
*/
-global define list SwappingPartitions()``{
- list ret = [];
- SCR::UnmountAgent (.proc.swaps);
- list<map> swaps = filter(map e, (list<map>) SCR::Read( .proc.swaps ),
- ``(e["type"]:""=="partition"));
- if( swaps==nil )
+global list SwappingPartitions()
+{
+ SCR::UnmountAgent(.proc.swaps);
+ list<map> swaps = (list<map>) SCR::Read(.proc.swaps);
+ if (swaps == nil) {
+ y2error("SCR::Read(.proc.swaps) returned nil");
swaps = [];
- ret = maplist(map e, swaps, ``(Partitions::TranslateMapperName(e["file"]:"")) );
- y2milestone( "SwappingPartitions %1", ret );
- return( ret );
}
+ swaps = filter(map e, swaps, ``(e["type"]:""=="partition"));
+ list ret = maplist(map e, swaps, ``(Partitions::TranslateMapperName(e["file"]:"")));
+ y2milestone("SwappingPartitions %1", ret);
+ return ret;
+}
global define list GetDestroyedLvmVgs( map