/tests/test-modules/a.c
https://code.google.com/ · C · 94 lines · 43 code · 13 blank · 38 comment · 0 complexity · 6c814ca7fb9834ed461c8eaf4dd37792 MD5 · raw file
- /*****************************************************************************\
- * $Id$
- *****************************************************************************
- * Copyright (C) 2010 Lawrence Livermore National Security, LLC.
- * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
- * UCRL-CODE-2003-005.
- * This file is part of Pdsh, a parallel remote shell program.
- * For details, see <http://www.llnl.gov/linux/pdsh/>.
- *
- * Pdsh is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * Pdsh is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License along
- * with Pdsh; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
- \*****************************************************************************/
- #if HAVE_CONFIG_H
- # include "config.h"
- #endif
- #include <stdio.h>
- #include "src/pdsh/mod.h"
- int pdsh_module_priority = DEFAULT_MODULE_PRIORITY;
- static int opt_a(opt_t *, int, char *);
- static int a_init (void);
- /*
- * Export pdsh module operations structure
- */
- struct pdsh_module_operations a_module_ops = {
- (ModInitF) a_init,
- (ModExitF) NULL,
- (ModReadWcollF) NULL,
- (ModPostOpF) NULL,
- };
- /*
- * Export rcmd module operations
- */
- struct pdsh_rcmd_operations a_rcmd_ops = {
- (RcmdInitF) NULL,
- (RcmdSigF) NULL,
- (RcmdF) NULL,
- };
- /*
- * Export module options
- */
- struct pdsh_module_option a_module_options[] =
- { { 'a', NULL, "the a option for Module A", DSH | PCP, (optFunc) opt_a },
- PDSH_OPT_TABLE_END
- };
- /*
- * A module info
- */
- struct pdsh_module pdsh_module_info = {
- "misc",
- "A",
- "Mark Grondona",
- "Module test A",
- DSH,
- &a_module_ops,
- &a_rcmd_ops,
- &a_module_options[0],
- };
- static int opt_a(opt_t *pdsh_opt, int opt, char *arg)
- {
- fprintf (stdout, "A: got option\n");
- return 0;
- }
- static int a_init (void)
- {
- fprintf (stdout, "A: in init\n");
- return 0;
- }
- /*
- * vi: tabstop=4 shiftwidth=4 expandtab
- */