md_names.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* 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 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_MD_NAMES_H
#define _SYS_MD_NAMES_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#define NM_ALLOC_SIZE 512
#define NM_DID_ALLOC_SIZE 1024
#define NM_NOCOMMIT 0x0100
#define NM_SHARED 1
#define NM_NOTSHARED 0
#define NM_DEVID 0x0010
#define NM_IMP_SHARED 0x0020
#define NM_DEVID_VALID 1
#define NM_DEVID_INVALID 0
#pragma pack(4)
#endif
#ifdef _KERNEL
struct nm_rec_hdr {
};
#else /* ! _KERNEL */
struct nm_rec_hdr {
void *r_next_rec; /* ptr to record, calc at boot */
};
#endif /* _KERNEL */
struct nm_next_hdr {
struct nm_next_hdr *nmn_nextp;
void *nmn_record;
};
struct nm_shr_rec {
struct nm_shared_name {
/* sn_data NOT USED anywhere */
} sr_name[1];
};
#define SHR_NAMSIZ(n) \
(((sizeof (struct nm_shared_name) - 1) + \
struct nm_rec {
struct nm_name {
} r_name[1];
};
#define NAMSIZ(n) \
(((sizeof (struct nm_name) - 1) + \
/*
* Device id support
*/
struct devid_shr_rec {
struct nm_rec_hdr did_rec_hdr;
struct did_shr_name {
char did_devid[1];
} device_id[1];
};
#define DID_SHR_NAMSIZ(n) \
(((sizeof (struct did_shr_name) - 1) + \
struct devid_min_rec {
struct nm_rec_hdr min_rec_hdr;
struct did_min_name {
char min_name[1];
} minor_name[1];
};
#define DID_NAMSIZ(n) \
(((sizeof (struct did_min_name) - 1) + \
struct nm_header {
};
struct nm_header_hdr {
struct nm_next_hdr hh_names;
struct nm_next_hdr hh_shared;
};
#pragma pack()
#endif
#ifdef __cplusplus
}
#endif
#endif /* _SYS_MD_NAMES_H */