/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 2002 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* show.c: support for scadm show <variable> option (to show the value of
* a service processor NV variable)
*/
#include <libintl.h>
#include <stdio.h>
#include <string.h>
#include "librsc.h"
#include "adm.h"
char *ADM_Get_Var(char *Variable);
static void ADM_Show_Var(char *Variable);
static void command_line();
void
{
char *oldVar;
gettext("USAGE: scadm show [variable]"));
exit(-1);
}
ADM_Start();
if (argc == 2) {
newVar[0] = 0x0;
}
} else {
}
}
void
{
ADM_Start();
DP_GET_NETWORK_CFG_R, sizeof (dp_get_network_cfg_r_t));
/* Print the network configuration */
} else {
#if 0
/* Include this if we want to display the IP mode */
(void) printf("%s %s\r\n",
gettext("SC network configuration is:"),
#endif
}
}
char
{
char *varValue;
command_line();
exit(-1);
}
DP_GET_CFGVAR_R, sizeof (dp_get_cfgvar_r_t));
exit(-1);
}
/* show variable setting */
/* The variable setting is right after the Status of the message */
sizeof (dp_get_cfgvar_r_t)]);
return (varValue);
}
static void
{
char *varValue;
}
static int
{
char *var;
else
/* termination */
command_line();
exit(-1);
}
DP_GET_CFGVAR_NAME_R, sizeof (dp_get_cfgvar_name_r_t));
/* Last variable read */
return (-1);
}
/* The variable is right after the Status of the message */
sizeof (dp_get_cfgvar_name_r_t)]);
return (0);
}
static void
{
gettext("scadm: command line too long"));
}