Skip to content

Commit

Permalink
- tiny refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
aschnell committed Jan 10, 2013
1 parent d522479 commit 81aa0c8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
9 changes: 4 additions & 5 deletions storage/src/modules/Storage.ycp
Expand Up @@ -6101,12 +6101,11 @@ global define map onepartition2fstab (map part, integer& other_nr)
};


global void AddHwPackage( string name )
global void AddHwPackages( list<string> names )
{
y2milestone( "AddHwPackage name %1 list:%2", name, hw_packages );
if( find( string s, hw_packages, ``(s==name)) == nil )
hw_packages = add( hw_packages, name );
y2milestone( "AddHwPackage list:%1", hw_packages );
y2milestone( "AddHwPackages names:%1 list:%2", names, hw_packages );
hw_packages = (list<string>) union(hw_packages, names);
y2milestone( "AddHwPackages list:%1", hw_packages );
}


Expand Down
7 changes: 2 additions & 5 deletions storage/src/modules/StorageControllers.ycp
Expand Up @@ -297,12 +297,9 @@ global void Initialize()
map controller = controllers[cindex]:$[];
y2milestone( "Initialize controller %1", controller );

if( size(controller["requires"]:[])>0 )
if( !isempty(controller["requires"]:[]) )
{
foreach( string s, controller["requires"]:[],
``{
Storage::AddHwPackage( s );
});
Storage::AddHwPackages( controller["requires"]:[] );
}

cindex = cindex + 1;
Expand Down

0 comments on commit 81aa0c8

Please sign in to comment.