dev.c revision 74a31ce69a88d851777ca840d31ec610ce9ecab3
/*
* 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 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <limits.h>
#include <strings.h>
#include <string.h>
#include <unistd.h>
#include <stdio.h>
#include <alloca.h>
#include <libnvpair.h>
#include <fm/topo_mod.h>
#include <topo_subr.h>
#include <topo_error.h>
topo_instance_t, void *);
#define DEV_VERSION TOPO_VERSION
static const topo_method_t dev_methods[] = {
{ NULL }
};
static const topo_modinfo_t dev_info =
void
{
return;
}
}
void
{
}
/*ARGSUSED*/
static int
{
return (0);
}
static void
{
}
static ssize_t
{
int more_auth = 0;
int err;
return (-1);
/* Get authority, if present */
return (-1);
/* Get devid, if present */
return (-1);
/* There must be a device path present */
return (-1);
(void) nvlist_lookup_string(anvl,
(void) nvlist_lookup_string(anvl,
(void) nvlist_lookup_string(anvl,
(void) nvlist_lookup_string(anvl,
(void) nvlist_lookup_string(anvl,
more_auth++;
more_auth++;
more_auth++;
more_auth++;
more_auth++;
}
/* dev:// */
/* authority, if any */
NULL);
/* device-id part, topo_fmristr_build does nothing if devid is NULL */
/* device-path part */
return (size);
}
/*ARGSUSED*/
static int
{
if (version > TOPO_METH_NVL2STR_VERSION)
}
}
return (0);
}
/*ARGSUSED*/
static int
{
char *devpath;
char *str;
int err;
if (version > TOPO_METH_STR2NVL_VERSION)
/* We're expecting a string version of a dev scheme FMRI */
char *n;
int len;
if (n == NULL)
devpath = n + 1;
}
/* the device-path should start with a slash */
if (*devpath != '/')
if (err != 0) {
}
return (0);
}
static nvlist_t *
{
int e;
return (NULL);
}
if (e == 0)
return (out);
return (NULL);
}
/*ARGSUSED*/
static int
{
if (version > TOPO_METH_FMRI_VERSION)
}
return (-1);
return (0);
}