From 3a7a2a0fc4a5d4e79e05c3aca21d485f4c39e524 Mon Sep 17 00:00:00 2001 From: jjhua Date: Thu, 21 May 2009 09:26:58 +0000 Subject: [PATCH] add {h} to show the usage() git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3427 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/PPCrflash.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/perl-xCAT/xCAT/PPCrflash.pm b/perl-xCAT/xCAT/PPCrflash.pm index c1fbbddb2..5d253d2b9 100644 --- a/perl-xCAT/xCAT/PPCrflash.pm +++ b/perl-xCAT/xCAT/PPCrflash.pm @@ -64,7 +64,7 @@ sub parse_args { # Process command-line arguments ############################################# if ( !defined( $args )) { - return(usage( "No command specified" )); + return(usage( "No arguments specified" )); } ############################################# @@ -86,7 +86,11 @@ sub parse_args { if ( exists( $opt{v} )) { return( \$::VERSION ); } - + + if ( exists( $opt{h}) || $opt{help}) { + return( usage()); + } + ################################# #Option --activate not valid with --commit or --recover #################################