/*
* 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
*/
/*
*/
#ifndef _DEVFSADM_H
#define _DEVFSADM_H
#include <libdevinfo.h>
#include <sys/devinfo_impl.h>
#include <regex.h>
#ifndef DEBUG
#else
#endif
#include <assert.h>
#ifdef __cplusplus
extern "C" {
#endif
#define DEVFSADM_SUCCESS 0
#define DEVFSADM_TRUE 0
#define ILEVEL_0 0
#define DEVFSADM_V0 0
#define DEVFSADM_CONTINUE 0
#define INTEGER 0
/* command to start daemon */
/* devfsadm event service door */
/* File of reserved devnames */
/* flags for devfsadm_mklink */
typedef struct devfsadm_create {
typedef struct devfsadm_remove {
void (*callback_fcn)(char *);
typedef struct devfsadm_remove_V1 {
int (*callback_fcn)(char *);
typedef struct _devfsadm_create_reg {
/* structures */
typedef struct _devfsadm_remove_reg {
/* structures */
typedef struct _devfsadm_remove_reg_V1 {
/* structures */
/*
* "flags" in the devfs_enumerate structure can take the following values.
* These values specify the substring of devfs path to be used for
* enumeration. Components (see MATCH_ADDR/MATCH_MINOR) may be specified
* by using the "match_arg" member in the devfsadm_enumerate structure.
*/
/*
* The following flags are private to devfsadm and the disks module.
* NOT to be used by other modules.
*/
typedef struct devfsadm_enumerate {
char *re;
int subexp;
char *match_arg;
void *cb_arg;
DEVFSADM_V0, \
(sizeof (tbl) / sizeof (devfsadm_create_t)), \
((devfsadm_create_t *)(tbl)) }
DEVFSADM_V0, \
(sizeof (tbl) / sizeof (devfsadm_remove_t)), \
((devfsadm_remove_t *)(tbl)) }
DEVFSADM_V1, \
(sizeof (tbl) / sizeof (devfsadm_remove_V1_t)), \
((devfsadm_remove_V1_t *)(tbl)) }
/* reserved devname support */
typedef struct devlink_re {
char *d_re;
int d_subexp;
} devlink_re_t;
typedef struct enumerate_file {
char *er_file;
char *er_id;
int devfsadm_noupdate(void);
const char *devfsadm_root_path(void);
void devfsadm_rm_link(char *file);
void devfsadm_rm_all(char *file);
void devfsadm_errprint(char *message, ...);
/* devlink cache related */
/*
* Private enumerate interface for disks and sgen modules
*/
/*
* Private interfaces for ports module (port_link.c).
*/
/* Private interface between reserve subsystm and disks link generator */
int devfsadm_have_reserved(void);
#ifdef __cplusplus
}
#endif
#endif /* _DEVFSADM_H */