/*
* 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 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* System includes
*/
#include <stdio.h>
#include <limits.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <locale.h>
#include <libintl.h>
#include <assert.h>
/*
* local pkg command library includes
*/
#include "libinst.h"
#include "messages.h"
/*
* forward declarations
*/
static int
int a_errIndex);
/*
* *****************************************************************************
* global external (public) functions
* *****************************************************************************
*/
int
{
char *packageName;
char *zonenames;
int err;
int i;
int numzones = 0;
/* entry assertions */
/* entry debugging info */
/* go through dependency table, collect, collapse, report errors */
int j;
}
if (erc->er_numEntries == 0) {
continue;
}
for (j = 0; j < erc->er_numEntries; j++) {
int k;
}
for (k = 0; k < eir->ier_numZones; k++) {
int err;
if (err != 0) {
}
return (err);
}
}
continue;
}
} else {
/* LINTED variable format specifier to ... */
}
/* call check function */
if (err != 0) {
}
return (err);
}
} else {
/* no check function - just report message */
msgbuf);
}
}
}
}
return (0);
}
void
char *a_zoneName, char *a_value)
{
int i;
/*
* create new error record and entry if first entry
* record will look like this:
* err->er_#entry=1
* err->entry[0]->record->ier_numZones=1
* err->entry[0]->record->ier_packageName=a_pkginst
* err->entry[0]->record->ier_zones[0]=a_zoneName
* err->entry[0]->record->ier_values[0]=a_value
*/
if (a_erc->er_numEntries == 0) {
sizeof (depckErrorRecord_t));
return;
}
/* see if this package already has an entry if so add zone to list */
for (i = 0; i < a_erc->er_numEntries; i++) {
continue;
}
/*
* this package already has an entry - add zone to
* existing package entry the modified records will
* look like this:
* err->er_#entry++;
* err->entry[0]->...
* err->entry[i]->
* -------------->record->
* ---------------------->ier_numZones++;
* ---------------------->ier_packageName=a_pkginst
* ---------------------->ier_zones[0]=...
* ---------------------->ier_zones[...]=...
* ---------------------->ier_zones[ier_numZones-1]=a_zoneName
* ---------------------->ier_values[0]=...
* ---------------------->ier_values[...]=...
* ---------------------->ier_values[ier_numZones-1]=a_value
* err->entry[i+1]->...
*/
erc->ier_numZones++;
sizeof (char **)*erc->ier_numZones);
sizeof (char **)*erc->ier_numZones);
return;
}
/*
* this packages does not have an entry - add new package
* entry for this zone the modified records will look like this:
* err->er_#entry++;
* err->entry[0]->record->ier_numZones=...
* err->entry[0]->record->ier_packageName=...
* err->entry[0]->record->ier_zones[0]=...
* err->entry[0]->record->ier_values[0]=...
* err->entry[er_#entry-1]->record->ier_numZones=1
* err->entry[er_#entry-1]->record->ier_packageName=a_pkginst
* err->entry[er_#entry-1]->record->ier_zones[0]=a_zoneName
* err->entry[er_#entry-1]->record->ier_values[0]=a_value
*/
a_erc->er_numEntries++;
}
/*
* *****************************************************************************
* static internal (private) functions
* *****************************************************************************
*/
static int
int a_errIndex)
{
"package", a_packageName,
} else {
/* LINTED variable format specifier to snprintf(); */
"package", a_packageName,
}
int err;
msgbuf);
if (err != 0) {
return (err);
}
} else {
msgbuf);
}
return (0);
}
} else {
char *p;
zn = p;
}
*r_zoneNames = zn;
return (0);
}