/*
* 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
*/
/*
*/
#include <libintl.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <strings.h>
#include <syslog.h>
#include <unistd.h>
#include <errno.h>
#include "utils.h"
/*PRINTFLIKE2*/
void
{
}
/*PRINTFLIKE2*/
void
{
char *c;
*buf = 0;
} else
*c = 0;
}
#ifdef DEBUG_MSG
/*PRINTFLIKE1*/
void
{
if (get_message_priority() < RCM_DEBUG)
return;
}
/*PRINTFLIKE1*/
void
{
if (get_message_priority() < RCM_DEBUG_HIGH)
return;
}
#endif /* DEBUG_MSG */
/*PRINTFLIKE1*/
void
{
if (get_message_priority() < RCM_WARN)
return;
}
/*PRINTFLIKE1*/
void
{
if (get_message_priority() < RCM_ERR)
return;
}
/*PRINTFLIKE1*/
void
{
if (get_message_priority() < RCM_INFO)
return;
}
char *
{
if (p == NULL)
p = arg0;
else
p++;
pname = p;
return (pname);
}
/*
* Output a message to the controlling tty or log, depending on which is
* configured. The message should contain no newlines.
*/
static void
{
if (message_priority >= level) {
switch (message_dst) {
case RCD_STD:
}
break;
case RCD_SYSLOG:
switch (level) {
case RCM_ERR:
break;
case RCM_WARN:
break;
case RCM_INFO:
break;
case RCM_DEBUG:
break;
}
if (syslog_severity >= 0)
break;
}
}
}
get_message_priority(void)
{
return (message_priority);
}
{
return (old_priority);
}
{
return (old_dst);
}
void
{
}
int
xatoi(char *p)
{
int i;
char *q;
errno = 0;
i = (int)strtol(p, &q, 10);
if (errno != 0 || q == p || i < 0 || *q != '\0') {
return (-1);
} else {
return (i);
}
}
/*
* get_running_zones() calls zone_list(2) to find out how many zones are
* running. It then calls zone_list(2) again to fetch the list of running
* zones (stored in *zents).
*/
int
{
int i;
return (E_ERROR);
}
if (*nzents == 0)
return (E_SUCCESS);
return (E_ERROR);
}
nzents_saved = *nzents;
return (E_ERROR);
}
if (*nzents != nzents_saved) {
/* list changed, try again */
goto again;
}
return (E_ERROR);
}
for (i = 0; i < *nzents; i++) {
"zoneid %d\n"), zids[i]);
continue;
}
continue;
zentp++;
}
return (E_SUCCESS);
}