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
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]
23 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
30 #pragma ident "%Z%%M% %I% %E% SMI"
36 #include <sys/types.h>
41 #define EXIT_IF_CHECK_FAILED 0x80000000
44 * Condition to be checked for a device
46 #define CHECK_TYPE_NOT_CDROM 1
47 #define CHECK_DEVICE_NOT_READY 2
48 #define CHECK_DEVICE_NOT_WRITABLE 4
49 #define CHECK_NO_MEDIA 8
50 #define CHECK_MEDIA_IS_NOT_WRITABLE 0x10
51 #define CHECK_MEDIA_IS_NOT_BLANK 0x20
52 #define CHECK_MEDIA_IS_NOT_ERASABLE 0x40
57 #define AUDIO_TYPE_NONE 0
58 #define AUDIO_TYPE_SUN 1
59 #define AUDIO_TYPE_WAV 2
60 #define AUDIO_TYPE_CDA 3
61 #define AUDIO_TYPE_AUR 4
63 extern int progress_pos
;
64 extern int priv_change_needed
;
66 void *my_zalloc(size_t size
);
67 int str_print(char *str
, int pos
);
68 void print_trackio_error(struct trackio_error
*te
);
69 char *get_err_str(void);
70 int get_audio_type(char *ext
);
71 void init_progress(void);
72 int progress(int64_t arg
, int64_t completed
);
73 void raise_priv(void);
74 void lower_priv(void);
75 int check_auth(uid_t uid
);
76 void ms_delay(uint_t ms
);