sys/fs/zfs.h: replace grub in comments.
[unleashed.git] / include / sys / hwconf.h
blob4e9966a7b7612d42218c12a86089efc550d0c16d
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 2004 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #ifndef _SYS_HWCONF_H
28 #define _SYS_HWCONF_H
30 #pragma ident "%Z%%M% %I% %E% SMI"
32 #include <sys/dditypes.h>
33 #include <sys/ddipropdefs.h>
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
39 #define MAX_HWC_LINESIZE 1024
41 struct hwc_class {
42 struct hwc_class *class_next;
43 char *class_exporter;
44 char *class_name;
47 struct hwc_spec {
48 struct hwc_spec *hwc_next;
49 char *hwc_parent_name;
50 char *hwc_class_name;
51 char *hwc_devi_name;
52 ddi_prop_t *hwc_devi_sys_prop_ptr;
53 /* For hashing */
54 struct hwc_spec *hwc_hash_next;
55 major_t hwc_major;
59 * used to create sorted linked lists of hwc_spec structs for loading parents
61 struct par_list {
62 struct par_list *par_next;
63 struct hwc_spec *par_specs; /* List of prototype nodes */
64 major_t par_major; /* Simple name of parent */
67 struct bind {
68 struct bind *b_next;
69 char *b_name;
70 char *b_bind_name;
71 int b_num;
74 typedef struct mperm {
75 struct mperm *mp_next;
76 char *mp_minorname;
77 mode_t mp_mode;
78 uid_t mp_uid;
79 gid_t mp_gid;
80 #ifndef _KERNEL
81 char *mp_drvname;
82 char *mp_owner;
83 char *mp_group;
84 #endif /* !_KERNEL */
85 } mperm_t;
87 #ifdef _KERNEL
89 extern struct bind *mb_hashtab[];
90 extern struct bind *sb_hashtab[];
92 extern int hwc_parse(char *, struct par_list **, ddi_prop_t **);
93 extern struct par_list *impl_make_parlist(major_t);
94 extern int impl_free_parlist(major_t);
95 extern void impl_delete_par_list(struct par_list *);
96 extern int impl_parlist_to_major(struct par_list *, char []);
97 extern struct hwc_spec *hwc_get_child_spec(dev_info_t *, major_t);
98 extern void hwc_free_spec_list(struct hwc_spec *);
100 #endif /* _KERNEL */
102 #ifdef __cplusplus
104 #endif
106 #endif /* _SYS_HWCONF_H */