zone.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* 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 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <mdb/mdb_param.h>
#include <mdb/mdb_modapi.h>
#include "zone.h"
#include <stddef.h>
#define ZONE_NAMELEN 20
#ifdef _LP64
#define ZONE_PATHLEN 32
#else
#define ZONE_PATHLEN 40
#endif
int
{
char name[ZONE_NAMELEN];
char path[ZONE_PATHLEN];
int len;
if (argc != 0)
return (DCMD_USAGE);
if (!(flags & DCMD_ADDRSPEC)) {
mdb_warn("can't walk zones");
return (DCMD_ERR);
}
return (DCMD_OK);
}
if (DCMD_HDRSPEC(flags)) {
mdb_printf("%<u>%?s %6s %-20s %-s%</u>\n",
"ADDR", "ID", "NAME", "PATH");
}
return (DCMD_ERR);
}
if (len > 0) {
if (len == ZONE_NAMELEN)
} else {
}
if (len > 0) {
if (len == ZONE_PATHLEN)
} else {
}
return (DCMD_OK);
}
int
{
mdb_warn("failed to find 'zone_active'");
return (WALK_ERR);
}
}
mdb_warn("couldn't walk 'list'");
return (WALK_ERR);
}
return (WALK_NEXT);
}
int
{
wsp->walk_cbdata));
}
int
{
mdb_warn("global walk not supported\n");
return (WALK_ERR);
}
mdb_warn("couldn't walk 'list'");
return (WALK_ERR);
}
return (WALK_NEXT);
}
int
{
wsp->walk_cbdata));
}
struct zsd_cb_data {
int found;
};
/* ARGSUSED */
static int
{
return (WALK_ERR);
}
return (WALK_NEXT);
return (WALK_DONE);
}
int
{
struct zsd_cb_data cbd;
if ((flags & DCMD_ADDRSPEC) == 0) {
mdb_warn("address of zone not specified\n");
return (DCMD_ERR);
}
if (argc != 1)
return (DCMD_USAGE);
else
return (DCMD_ERR);
}
mdb_warn("failed to walk zsd\n");
return (DCMD_ERR);
}
mdb_warn("no corresponding ZSD value found for key %d\n",
key);
return (DCMD_ERR);
}
return (DCMD_OK);
}