xref: /titanic_41/usr/src/cmd/lvm/metassist/layout/layout_discovery.h (revision a2bb96e7d59f447f59bc306e53b7d00e38594667)
1 /*
2  * CDDL HEADER START
3  *
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.
8  *
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.
13  *
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]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef _LAYOUT_DISCOVERY_H
28 #define	_LAYOUT_DISCOVERY_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 #include "libdiskmgt.h"
37 
38 /*
39  * scan physical devices and build lists of known devices.
40  */
41 extern int	discover_known_devices();
42 
43 /*
44  * release lists of known devices.
45  */
46 extern int	release_known_devices();
47 
48 /*
49  * scan known devices and build lists of usable devices.
50  */
51 extern int	discover_usable_devices(char *diskset);
52 
53 /*
54  * release lists of usable devices.
55  */
56 extern int	release_usable_devices();
57 
58 /*
59  * functions to access lists of known devices for the system,
60  * constructed by load_physical_devices
61  */
62 extern int	get_known_slices(dlist_t **list);
63 extern int	get_known_disks(dlist_t **list);
64 extern int	get_known_hbas(dlist_t **list);
65 
66 /*
67  * functions to access lists of devices for the named diskset
68  * constructed by load_physical_devices
69  */
70 extern int	get_usable_slices(dlist_t **list);
71 extern int	get_usable_disks(dlist_t **list);
72 extern int	get_usable_hbas(dlist_t **list);
73 
74 /*
75  * predicate indicating whether MPXIO appears enabled for the system
76  */
77 extern boolean_t	is_mpxio_enabled();
78 
79 /*
80  * functions that set/get a descriptor's multipath alias name(s).
81  */
82 extern int	get_aliases(dm_descriptor_t desc, dlist_t **aliases);
83 extern int	set_alias(dm_descriptor_t desc, char	*alias);
84 
85 #ifdef __cplusplus
86 }
87 #endif
88 
89 #endif /* _LAYOUT_DISCOVERY_H */
90