5734 IPFGENITER needs to know when to hit the brakes
[illumos-gate.git] / usr / src / head / metadyn.h
blobb26606845ca07a3b99520bf15fc11be08531cf31
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
20 * CDDL HEADER END
23 * Copyright (c) 1998, 2000 by Sun Microsystems, Inc.
24 * All rights reserved.
27 #ifndef _METADYN_H
28 #define _METADYN_H
30 #pragma ident "%Z%%M% %I% %E% SMI"
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
36 #define METALDPATH_DEFAULT "/usr/lib"
37 #define METATOOLLDPATH_DEFAULT "/usr/sadm/lib/lvm"
39 typedef enum {
41 * Conversion of driver name from cinfo should have occurred,
42 * but something prevented that from taking place.
44 Convert_Error,
47 * The library being called doesn't handle this driver so nothing
48 * was done.
50 Convert_Noop,
53 * Conversion completed without errors.
55 Convert_Okay
56 } meta_convert_e;
58 meta_convert_e convert_path(mdname_t *, struct dk_cinfo *, mdcinfo_t *,
59 md_error_t *);
61 typedef enum {
63 * While trying to determine information regarding the enclosure,
64 * such as tray, bus, or world wide number and error occurred.
66 Enclosure_Error,
69 * This library doesn't handle this device name. No changes have been
70 * made to the structures.
72 Enclosure_Noop,
75 * Successfully determined all pertinent information regarding
76 * the enclosure.
78 Enclosure_Okay
79 } meta_enclosure_e;
81 meta_enclosure_e get_enclosure(mdname_t *, mdcinfo_t *, md_error_t *);
83 typedef enum {
85 * When one library tries to load another and finds the second
86 * library already locked, lock_and_load will return this value.
88 Library_Locked,
91 * If all goes well during a library load we'll receive this
92 * return code.
94 Library_Unlocked,
97 * Failed to even open the requested library
99 Library_Open_Error
100 } meta_library_e;
102 meta_library_e lock_and_load(const char *, void **);
103 void unlock_and_unload(void *);
105 char *get_phys_name(char *);
107 #ifdef __cplusplus
109 #endif
111 #endif /* _METADYN_H */