From f2965109a50e85f528df34256964a03c3091efd8 Mon Sep 17 00:00:00 2001 From: wanghuaz Date: Tue, 13 Oct 2009 06:02:45 +0000 Subject: [PATCH] Fixed defect 2840135 that getmacs -F option containing wrong format but not returen error. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4362 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/PPCmac.pm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/perl-xCAT/xCAT/PPCmac.pm b/perl-xCAT/xCAT/PPCmac.pm index a38215f62..60575bdc9 100644 --- a/perl-xCAT/xCAT/PPCmac.pm +++ b/perl-xCAT/xCAT/PPCmac.pm @@ -179,6 +179,21 @@ sub parse_args { } elsif ( exists($opt{S}) || exists($opt{G}) || exists($opt{C}) ) { return( [RC_ERROR,"Option '-D' is required for ping test\n"] ); } + + #################################### + # Check -F options's format + #################################### + if ( exists($opt{F}) ) { + my @filters = split /,/,$opt{F}; + foreach ( @filters ) { + my @value = split /=/,$_; + if ( !@value[1] ) { + return( usage("Option '-F' contains wrong filter format") ); + } + } + } + + #################################### # Set method to invoke ####################################