3057 Remove sgml util from cmd/man
[unleashed.git] / usr / src / cmd / cdrw / trackio.h
blob29c374b0b5c8bbed63a1412dbe8fad5414354240
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 2005 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #ifndef _TRACKIO_H
28 #define _TRACKIO_H
30 #pragma ident "%Z%%M% %I% %E% SMI"
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
36 #include <sys/types.h>
37 #include "bstream.h"
38 #include "misc_scsi.h"
40 struct trackio_error {
41 int err_type;
42 /* File I/O errors */
43 int te_errno;
44 /* Transport Errors */
45 uchar_t status, key, asc, ascq;
49 * trackio error types
51 #define TRACKIO_ERR_SYSTEM 1
52 #define TRACKIO_ERR_TRANSPORT 2
53 #define TRACKIO_ERR_USER_ABORT 3
56 * iob state
58 #define IOBS_UNDER_FILE_IO 1
59 #define IOBS_UNDER_DEVICE_IO 2
60 #define IOBS_READY 3
61 #define IOBS_EMPTY 4
63 struct iobuf {
64 uchar_t *iob_buf;
65 uint32_t iob_total_size; /* total size of the buf */
66 uint32_t iob_data_size; /* size of the data in buf */
67 uint32_t iob_start_blk; /* starting block address on the device */
68 uint16_t iob_nblks; /* number of data blocks in this buf */
69 int iob_state; /* state of buf */
72 /* Use small buffers. Some drives do not behave well with large buffers */
73 #define NIOBS 8
74 #define NBLKS_PER_BUF 24 /* < 64K in all cases */
75 #define DATA_TRACK_BLKSIZE 2048
76 #define AUDIO_TRACK_BLKSIZE 2352
78 int write_track(cd_device *dev, struct track_info *ti, bstreamhandle h,
79 int (*cb)(int64_t, int64_t), int64_t arg, struct
80 trackio_error *te);
82 #ifdef __cplusplus
84 #endif
86 #endif /* _TRACKIO_H */