/*
* 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 "libdevinfo.h"
#include <strings.h>
/*
*
* This file contains interfaces to translate <driver><instance><minorname>
* information into /devices and /dev paths. It does this using interfaces to
* the kernel instance tree so that it can provide translations for devices
* which are no longer present. An example consumer of these interfaces is
* iostat(1M) - which shows, in its first iteration, activity since reboot.
* With persistant kstats, a device which was busy a long time ago can still
* have a decaying presence in iostat output, and that output, when '-n' is
* used, should show the public name.
*/
typedef struct {
} *idim_t;
{
return (NULL);
return (NULL);
}
}
void
{
if (idim->i_devlink_hdl) {
}
}
/*ARGSUSED*/
char *
char *minor_name)
{
int len;
int mlen;
char *devices;
/* convert drv_name to major_t */
return (NULL);
/* find the length of the devices path given major,instance */
return (NULL);
/*
* MODGETDEVFSPATH_MI_LEN result includes '\0' termination, but we
* may need to add space for ":<minor_name>"
*/
if (minor_name)
else
return (NULL);
return (NULL);
}
if (minor_name) {
/* add ':<minot_name>' to the end of /devices path */
}
return (devices);
}
/* di_dim_path_dev di_devlink callback */
static int
{
if (devpath)
return (DI_WALK_TERMINATE);
}
char *
{
char *devices;
/* we must have a minor_name to resolve to a public name */
if (minor_name == NULL)
return (NULL);
/* convert <driver><instance><minor_name> to /devices path */
return (NULL);
/* convert /devices path to /dev path */
return (dev);
}