ud_lib.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 (c) 1989 by Sun Microsystem, Inc.
*/
#ifndef _UD_LIB_H
#define _UD_LIB_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#define UD_VOL_REC_BSZ 2048
#define UD_ECMA_VER2 0x00000002
#define UD_ECMA_VER3 0x00000003
#define UD_ECMA_UNKN 0xFFFFFFFF
#define MAX_PARTS 10
#define MAX_MAPS 10
#define MAX_SPM 4
struct vds {
};
/*
* All addresses are the lbsize block numbers
* offseted into the partition
*/
struct udf {
#define INVALID_UDFS 0x0000
#define VALID_UDFS 0x0001
#define VALID_MVDS 0x0002
#define VALID_RVDS 0x0004
/*
* location of the latest lvid
*/
/*
* Location of the most usable fsd
* on WORM we have to follow till the
* end of the chain
* FSD location is absolute disk location
* after translating using maps and partitions
*/
};
struct ud_part {
#define UDP_BITMAPS 0x00
#define UDP_SPACETBLS 0x01
/* From part desc */
/* From lvid */
};
struct ud_map {
#define UDM_MAP_NORM 0x00
#define UDM_MAP_VPM 0x01
#define UDM_MAP_SPM 0x02
};
#define REG_DOM_ID 0x1
#define REG_UDF_ID 0x2
#define REG_UDF_II 0x4
#define EI_FLG_DIRTY 0x01
#define EI_FLG_PROT 0x02
struct dom_id_suffix {
};
#define PROTECT_SOFT_WRITE 0x01
#define PROTECT_HARD_WRITE 0x02
struct udf_id_suffix {
};
struct impl_id_suffix {
};
#define OS_CLASS_UNDEFINED 0x00
#define OS_CLASS_DOS_WIN3x 0x01
#define OS_CLASS_OS_2 0x02
#define OS_CLASS_MAC_OS_7 0x02
#define OS_CLASS_UNIX 0x04
#define OS_CLASS_WIN_95 0x05
#define OS_CLASS_WIN_NT 0x06
#define OS_IDENTIFIER_GENERIC 0x00
#define OS_IDENTIFIER_IBM_AIX 0x01
#define OS_IDENTIFIER_SOLARIS 0x02
#define OS_IDENTIFIER_HP_UX 0x03
#define OS_IDENTIFIER_SG_IRIX 0x04
#define OS_IDENTIFIER_LINUX 0x05
#define OS_IDENTIFIER_MK_LINUX 0x06
#define OS_IDENTIFIER_FREE_BSD 0x07
extern void ud_close_dev(int32_t);
extern void print_charspec(char *, struct charspec *);
extern void print_tstamp(char *, tstamp_t *);
extern void print_ext_ad(char *, struct extent_ad *);
extern void print_pvd(struct pri_vol_desc *);
extern void print_avd(struct anch_vol_desc_ptr *);
extern void print_vdp(struct vol_desc_ptr *);
extern void print_iuvd(struct iuvd_desc *);
extern void print_part(struct part_desc *);
extern void print_lvd(struct log_vol_desc *);
extern void print_usd(struct unall_spc_desc *);
extern void print_lvid(struct log_vol_int_desc *);
extern void print_part(struct part_desc *);
extern void print_fsd(struct file_set_desc *);
extern void print_phdr(struct phdr_desc *);
extern void print_fsd(struct file_set_desc *);
extern void print_icb_tag(struct icb_tag *);
extern void print_ie(struct indirect_entry *);
extern void print_fe(struct file_entry *);
extern void print_short_ad(char *, struct short_ad *);
extern void print_long_ad(char *, struct long_ad *);
#ifdef __cplusplus
}
#endif
#endif /* _UD_LIB_H */