/*
* 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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <syslog.h>
#include <errno.h>
#include <unistd.h>
#include <stropts.h>
#include "mp_utils.h"
#include <libdevinfo.h>
{
int numNodes = 0;
int instNum = 0;
int majorNum = 0;
while (DI_NODE_NIL != vh_node) {
while (DI_NODE_NIL != ph_node) {
if (haveList) {
"instNum = %d",
instNum);
"majorNum = %d",
majorNum);
osn = 0;
osn =
osn);
osn =
osn);
osn;
ownerId =
}
}
++numNodes;
}
}
}
"getOidList()",
" - numNodes: %d",
numNodes);
return (numNodes);
}
{
int i = 0;
int numNodes = 0;
if (DI_NODE_NIL == root_node) {
" - di_init() failed");
return (MP_STATUS_FAILED);
}
if (numNodes < 1) {
"no memory for *ppList");
" - error exit");
return (MP_STATUS_INSUFFICIENT_MEMORY);
}
" - returning empty list.");
return (MP_STATUS_SUCCESS);
}
"no memory for *ppList");
" - error exit");
return (MP_STATUS_INSUFFICIENT_MEMORY);
}
"(*ppList)->oids[%d].objectType = %d",
"(*ppList)->oids[%d].ownerId = %d",
"(*ppList)->oids[%d].objectSequenceNumber = %llx",
}
return (MP_STATUS_SUCCESS);
}