fmadm.c revision 25c6ff4b77fcddf4097ce78a8277275ca603b46c
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <strings.h>
#include <limits.h>
#include <stdlib.h>
#include <stdarg.h>
#include <stdio.h>
#include <errno.h>
#include <fmadm.h>
static const char *g_pname;
static int g_quiet;
/*PRINTFLIKE1*/
void
{
if (g_quiet)
return; /* suppress notices if -q specified */
}
static void
{
}
/*PRINTFLIKE1*/
void
{
}
/*PRINTFLIKE1*/
void
{
}
static const struct cmd {
const char *cmd_name;
const char *cmd_usage;
const char *cmd_desc;
} cmds[] = {
"display list of faulty resources" },
"notify fault manager that resource has been repaired" },
"acquit resource or acquit case" },
"notify fault manager that resource has been replaced" },
};
static int
{
char buf[256];
"Usage: %s [-P prog] [-q] [cmd [args ... ]]\n\n", g_pname);
continue;
} else {
}
}
return (FMADM_EXIT_USAGE);
}
static uint32_t
{
char *p;
errno = 0;
}
}
int
{
const char *p;
int c, err;
else
g_pname = p + 1;
else
switch (c) {
case 'P':
break;
case 'q':
g_quiet++;
break;
default:
}
}
break;
}
}
}