From 619bd26748ef2f3bd58775a303860db0c71b6138 Mon Sep 17 00:00:00 2001 From: lissav Date: Thu, 6 May 2010 18:53:17 +0000 Subject: [PATCH] check at least one flag supplied git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5997 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/tabutils.pm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/tabutils.pm b/xCAT-server/lib/xcat/plugins/tabutils.pm index e7f6c140f..23ee9be49 100644 --- a/xCAT-server/lib/xcat/plugins/tabutils.pm +++ b/xCAT-server/lib/xcat/plugins/tabutils.pm @@ -621,6 +621,14 @@ sub tabprune $cb->(\%rsp); return 1; + } + if (!(defined $PERCENT ) && (!(defined $RECID) && (!(defined $ALL)) && (!(defined $NUMBERENTRIES)))) { + my %rsp; + $rsp{data}->[0] = "One option -p or -i or -n or -a must be supplied."; + $rsp{errorcode} = 1; + $cb->(\%rsp); + return 1; + } if ((defined $PERCENT ) && ((defined $RECID) || (defined $ALL) || (defined $NUMBERENTRIES))) { my %rsp;