prtable.c revision 7166d658d92feaaa5e352bcc89ac223e558e4978
/*
* 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 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
* Portions Copyright 2009 Chad Mynhier
*/
#include <procfs.h>
#include <unistd.h>
#include <stdlib.h>
#include <pwd.h>
#include <ctype.h>
#include <string.h>
#include <libintl.h>
#include <errno.h>
#include <zone.h>
#include <libzonecfg.h>
#include "prstat.h"
#include "prutil.h"
#include "prtable.h"
void
{
}
static uid_t
{
}
void
{
} else {
}
}
void
{
}
} else {
}
}
int
{
size_t i;
return (1);
} else {
return (1); /* if table is empty return true */
}
return (0); /* nothing has been found */
}
void
{
}
}
int
{
size_t i;
return (1);
} else { /* if table is empty then */
return (1); /* pretend that element was found */
}
return (0); /* element was not found */
}
int
{
size_t i;
} else {
return (0);
}
return (1);
}
void
{
char *cp;
/*
* str should be either the name of a configured zone, or the
* id of a running zone. If str is a zone name, store the name
* in the table; otherwise, just store the id.
*/
/*NOTREACHED*/
}
/* was zone specified by name or id? */
errno = 0;
*cp == '\0') {
/* found it by id, don't store the name */
}
}
if (str)
else
}
int
{
long i;
return (1);
return (0); /* nothing has been found */
}
return (1); /* if table is empty return true */
}
/*
* Lookup ids for each zone name; this is done once each time /proc
* is scanned to avoid calling getzoneidbyname for each process.
*/
void
{
long i;
char *name;
}
}
}
void
{
}
void
{
while (elm) {
if (!elm_prev) /* first chain element */
else
break;
} else {
}
}
}
static plwp_t *
{
while (elm) {
return (elm);
else
}
return (NULL);
}
{
if (elm)
else
return (NULL);
}
int
{
while (elm) {
return (1);
else
}
return (0);
}
int
{
if (elm)
else
return (0);
}
void
{
if (elm)
}