/*___INFO__MARK_BEGIN__*/ /************************************************************************* * * The Contents of this file are made available subject to the terms of * the Sun Industry Standards Source License Version 1.2 * * Sun Microsystems Inc., March, 2001 * * * Sun Industry Standards Source License Version 1.2 * ================================================= * The contents of this file are subject to the Sun Industry Standards * Source License Version 1.2 (the "License"); You may not use this file * except in compliance with the License. You may obtain a copy of the * License at http://gridengine.sunsource.net/Gridengine_SISSL_license.html * * Software provided under this License is provided on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. * See the License for the specific provisions governing your rights and * obligations concerning the Software. * * The Initial Developer of the Original Code is: Sun Microsystems, Inc. * * Copyright: 2001 by Sun Microsystems, Inc. * * All Rights Reserved. * ************************************************************************/ /*___INFO__MARK_END__*/ #include #include #include #include "sge_stdio.h" #include "usage.h" #include "sge_feature.h" #include "sgermon.h" #include "sge_prog.h" #include "sge_options.h" #include "msg_common.h" #include "msg_gdilib.h" static void print_marked(u_long32 prog_number, FILE *fp); static char* get_argument_syntax(u_long32 prog_number, int nr); static void usage_silent(FILE *fp); static int marker[OA__END]; void mark_argument_syntax( int argument_number ) { marker[argument_number] = 1; } static char* get_argument_syntax(u_long32 prog_number, int nr) { switch (nr) { case OA_ACCOUNT_STRING: return MSG_GDI_ARGUMENTSYNTAX_OA_ACCOUNT_STRING; case OA_COMPLEX_LIST: return MSG_GDI_ARGUMENTSYNTAX_OA_COMPLEX_LIST; case OA_CONTEXT_LIST: return MSG_GDI_ARGUMENTSYNTAX_OA_CONTEXT_LIST; case OA_CKPT_SEL: return MSG_GDI_ARGUMENTSYNTAX_OA_CKPT_SEL; case OA_DATE_TIME: return MSG_GDI_ARGUMENTSYNTAX_OA_DATE_TIME; case OA_DESTIN_ID_LIST: return MSG_GDI_ARGUMENTSYNTAX_OA_DESTIN_ID_LIST; case OA_HOLD_LIST: if ((prog_number == QHOLD) || (prog_number == QRLS) ){ return MSG_GDI_ARGUMENTSYNTAX_OA_HOLD_LIST_QHOLD; } else { return MSG_GDI_ARGUMENTSYNTAX_OA_HOLD_LIST; } case OA_HOST_ID_LIST: return MSG_GDI_ARGUMENTSYNTAX_OA_HOST_ID_LIST; case OA_HOSTNAME_LIST: return MSG_GDI_ARGUMENTSYNTAX_OA_HOSTNAME_LIST; case OA_JOB_ID_LIST: return MSG_GDI_ARGUMENTSYNTAX_OA_JOB_ID_LIST; case OA_AR_ID: return MSG_GDI_ARGUMENTSYNTAX_OA_AR_ID; case OA_AR_ID_LIST: return MSG_GDI_ARGUMENTSYNTAX_OA_AR_ID_LIST; case OA_WC_AR: return MSG_GDI_ARGUMENTSYNTAX_OA_WC_AR; case OA_WC_AR_LIST: return MSG_GDI_ARGUMENTSYNTAX_OA_WC_AR_LIST; case OA_JOB_IDENTIFIER_LIST: return MSG_GDI_ARGUMENTSYNTAX_OA_JOB_IDENTIFIER_LIST; case OA_JOB_QUEUE_DEST: return MSG_GDI_ARGUMENTSYNTAX_OA_JOB_QUEUE_DEST; case OA_LISTNAME_LIST: return MSG_GDI_ARGUMENTSYNTAX_OA_LISTNAME_LIST; case OA_RQS_LIST: return MSG_GDI_ARGUMENTSYNTAX_OA_RQS_LIST; case OA_MAIL_ADDRESS: return MSG_GDI_ARGUMENTSYNTAX_OA_MAIL_ADDRESS; case OA_MAIL_LIST: return MSG_GDI_ARGUMENTSYNTAX_OA_MAIL_LIST; case OA_MAIL_OPTIONS: return MSG_GDI_ARGUMENTSYNTAX_OA_MAIL_OPTIONS; case OA_MAIL_OPTIONS_AR: return MSG_GDI_ARGUMENTSYNTAX_OA_MAIL_OPTIONS_AR; case OA_NODE_LIST: return MSG_GDI_ARGUMENTSYNTAX_OA_NODE_LIST; case OA_NODE_PATH: return MSG_GDI_ARGUMENTSYNTAX_OA_NODE_PATH; case OA_NODE_SHARES_LIST: return MSG_GDI_ARGUMENTSYNTAX_OA_NODE_SHARES_LIST; case OA_PATH: return MSG_GDI_ARGUMENTSYNTAX_OA_PATH; case OA_PATH_LIST: return MSG_GDI_ARGUMENTSYNTAX_OA_PATH_LIST; case OA_FILE_LIST: return MSG_GDI_ARGUMENTSYNTAX_OA_FILE_LIST; case OA_PRIORITY: return MSG_GDI_ARGUMENTSYNTAX_OA_PRIORITY; case OA_RESOURCE_LIST: return MSG_GDI_ARGUMENTSYNTAX_OA_RESOURCE_LIST; case OA_SERVER: return MSG_GDI_ARGUMENTSYNTAX_OA_SERVER; case OA_SERVER_LIST: return MSG_GDI_ARGUMENTSYNTAX_OA_SERVER_LIST; case OA_SIGNAL: return MSG_GDI_ARGUMENTSYNTAX_OA_SIGNAL; case OA_SIMPLE_CONTEXT_LIST: return MSG_GDI_ARGUMENTSYNTAX_OA_SIMPLE_CONTEXT_LIST; case OA_SLOT_RANGE: return MSG_GDI_ARGUMENTSYNTAX_OA_SLOT_RANGE; case OA_STATES: return MSG_GDI_ARGUMENTSYNTAX_OA_STATES; case OA_JOB_TASK_LIST: return MSG_GDI_ARGUMENTSYNTAX_OA_JOB_TASK_LIST; case OA_JOB_TASKS: if (prog_number == QRESUB) { return MSG_GDI_ARGUMENTSYNTAX_OA_JOB_TASKS_RESUB; } else { return MSG_GDI_ARGUMENTSYNTAX_OA_JOB_TASKS; } case OA_TASK_ID_RANGE: return MSG_GDI_ARGUMENTSYNTAX_OA_TASK_ID_RANGE; case OA_USER_LIST: return MSG_GDI_ARGUMENTSYNTAX_OA_USER_LIST; case OA_VARIABLE_LIST: return MSG_GDI_ARGUMENTSYNTAX_OA_VARIABLE_LIST; case OA_OBJECT_NAME: return MSG_GDI_ARGUMENTSYNTAX_OA_OBJECT_NAME; case OA_ATTRIBUTE_NAME: return MSG_GDI_ARGUMENTSYNTAX_OA_ATTRIBUTE_NAME; case OA_OBJECT_ID_LIST: return MSG_GDI_ARGUMENTSYNTAX_OA_OBJECT_ID_LIST; case OA_PROJECT_LIST: return MSG_GDI_ARGUMENTSYNTAX_OA_PROJECT_LIST; case OA_EVENTCLIENT_LIST: return MSG_GDI_ARGUMENTSYNTAX_OA_EVENTCLIENT_LIST; case OA_HOST_LIST: return MSG_GDI_ARGUMENTSYNTAX_OA_HOST_LIST; case OA_JSV_URL: return MSG_GDI_ARGUMENTSYNTAX_OA_JSV_URL; case OA_WC_CQUEUE: return MSG_GDI_ARGUMENTSYNTAX_OA_WC_CQUEUE; case OA_WC_HOST: return MSG_GDI_ARGUMENTSYNTAX_OA_WC_HOST; case OA_WC_HOSTGROUP: return MSG_GDI_ARGUMENTSYNTAX_OA_WC_HOSTGROUP; case OA_WC_QINSTANCE: return MSG_GDI_ARGUMENTSYNTAX_OA_WC_QINSTANCE; case OA_WC_QDOMAIN: return MSG_GDI_ARGUMENTSYNTAX_OA_WC_QDOMAIN; case OA_WC_QUEUE: return MSG_GDI_ARGUMENTSYNTAX_OA_WC_QUEUE; case OA_WC_QUEUE_LIST: return MSG_GDI_ARGUMENTSYNTAX_OA_WC_QUEUE_LIST; case OA_THREAD_NAME: return MSG_GDI_ARGUMENTSYNTAX_OA_THREAD_NAME; case OA_OBJECT_NAME2: return MSG_GDI_ARGUMENTSYNTAX_OA_OBJECT_NAME2; case OA_OBJECT_NAME3: return MSG_GDI_ARGUMENTSYNTAX_OA_OBJECT_NAME3; case OA_TIME: return MSG_GDI_ARGUMENTSYNTAX_OA_TIME; case OA_TASK_CONCURRENCY: return MSG_GDI_ARGUMENTSYNTAX_OA_TASK_CONCURRENCY; case OA_BINDING_EXPLICIT: return MSG_GDI_ARGUMENTSYNTAX_QA_BINDING_STRATEGY_EXP; case OA_BINDING_LINEAR: return MSG_GDI_ARGUMENTSYNTAX_QA_BINDING_STRATEGY_LIN; case OA_BINDING_STRIDING: return MSG_GDI_ARGUMENTSYNTAX_QA_BINDING_STRATEGY_STR; default: break; } return ""; /*(argument_syntax[nr]);*/ } static void print_marked( u_long32 prog_number, FILE *fp ) { int i; for (i=0; i