dld_minor.c revision 210db2243d3b5ca39c96a4c34c6d9453ddfbeaa9
/*
* 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"
/*
* Data-Link Driver
*/
#include <sys/dld_impl.h>
static vmem_t *minor_arenap;
static uint32_t minor_count;
/*
* Initialize this module's data structures.
*/
void
dld_minor_init(void)
{
/*
* Allocate a vmem arena to manage minor numbers. The range of the
* arena will be from 1 to MAXMIN (maximum legal minor number).
*/
}
/*
* Tear down this module's data structures.
*/
int
dld_minor_fini(void)
{
/*
* Check to see if there are any minor numbers still in use.
*/
if (minor_count != 0)
return (EBUSY);
return (0);
}
/*
* Allocate a new minor number.
*/
{
/*
* Grab a value from the arena.
*/
return (0);
return (minor);
}
/*
* Release a previously allocated minor number.
*/
void
{
/*
* Return the value to the arena.
*/
}