Chameleon

Chameleon Svn Source Tree

Root/branches/ErmaC/Trunk/i386/util/fdisk/util.h

1/*
2 * Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
3 *
4 *
5 * This file contains Original Code and/or Modifications of Original Code
6 * as defined in and that are subject to the Apple Public Source License
7 * Version 2.0 (the 'License'). You may not use this file except in
8 * compliance with the License. Please obtain a copy of the License at
9 * http://www.opensource.apple.com/apsl/ and read it before using this
10 * file.
11 *
12 * The Original Code and all software distributed under the License are
13 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
17 * Please see the License for the specific language governing rights and
18 * limitations under the License.
19 *
20 *-
21 * Copyright (c) 1995
22 *The Regents of the University of California. All rights reserved.
23 * Portions Copyright (c) 1996, Jason Downs. All rights reserved.
24 *
25 * Redistribution and use in source and binary forms, with or without
26 * modification, are permitted provided that the following conditions
27 * are met:
28 * 1. Redistributions of source code must retain the above copyright
29 * notice, this list of conditions and the following disclaimer.
30 * 2. Redistributions in binary form must reproduce the above copyright
31 * notice, this list of conditions and the following disclaimer in the
32 * documentation and/or other materials provided with the distribution.
33 * 3. All advertising materials mentioning features or use of this software
34 * must display the following acknowledgement:
35 *This product includes software developed by the University of
36 *California, Berkeley and its contributors.
37 * 4. Neither the name of the University nor the names of its contributors
38 * may be used to endorse or promote products derived from this software
39 * without specific prior written permission.
40 *
41 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 */
53
54#ifndef _UTIL_H_
55#define _UTIL_H_
56
57#include <sys/cdefs.h>
58#include <sys/types.h>
59
60/*
61 * fparseln() specific operation flags.
62 */
63#define FPARSELN_UNESCESC0x01
64#define FPARSELN_UNESCCONT0x02
65#define FPARSELN_UNESCCOMM0x04
66#define FPARSELN_UNESCREST0x08
67#define FPARSELN_UNESCALL0x0f
68
69/*
70 * opendev() specific operation flags.
71 */
72#define OPENDEV_PART0x01/* Try to open the raw partition. */
73#define OPENDEV_DRCT0x02/* Obsolete (now default behavior). */
74#define OPENDEV_BLCK0x04/* Open block, not character device. */
75
76/*
77 * uucplock(3) specific flags.
78 */
79#define UU_LOCK_INUSE (1)
80#define UU_LOCK_OK (0)
81#define UU_LOCK_OPEN_ERR (-1)
82#define UU_LOCK_READ_ERR (-2)
83#define UU_LOCK_CREAT_ERR (-3)
84#define UU_LOCK_WRITE_ERR (-4)
85#define UU_LOCK_LINK_ERR (-5)
86#define UU_LOCK_TRY_ERR (-6)
87#define UU_LOCK_OWNER_ERR (-7)
88
89/*
90 * stub struct definitions.
91 */
92struct __sFILE;
93struct login_cap;
94struct passwd;
95struct termios;
96struct winsize;
97
98__BEGIN_DECLS
99char *fparseln __P((struct __sFILE *, size_t *, size_t *, const char[3], int));
100intlogin_tty __P((int));
101intlogout __P((const char *));
102voidlogwtmp __P((const char *, const char *, const char *));
103intopendev __P((char *, int, int, char **));
104intpidfile __P((const char *));
105voidpw_setdir __P((const char *));
106char *pw_file __P((const char *));
107intpw_lock __P((int retries));
108intpw_mkdb __P((char *, int));
109intpw_abort __P((void));
110voidpw_init __P((void));
111voidpw_edit __P((int, const char *));
112voidpw_prompt __P((void));
113voidpw_copy __P((int, int, struct passwd *));
114voidpw_getconf __P((char *, size_t, const char *, const char *));
115intpw_scan __P((char *, struct passwd *, int *));
116voidpw_error __P((const char *, int, int));
117intopenpty __P((int *, int *, char *, struct termios *,
118 struct winsize *));
119intopendisk __P((const char *path, int flags, char *buf, size_t buflen,
120 int iscooked));
121pid_tforkpty __P((int *, char *, struct termios *, struct winsize *));
122intgetmaxpartitions __P((void));
123intgetrawpartition __P((void));
124voidlogin_fbtab __P((char *, uid_t, gid_t));
125intlogin_check_expire __P((struct __sFILE *, struct passwd *, char *, int));
126char *readlabelfs __P((char *, int));
127const char *uu_lockerr __P((int _uu_lockresult));
128int uu_lock __P((const char *_ttyname));
129intuu_lock_txfr __P((const char *_ttyname, pid_t _pid));
130int uu_unlock __P((const char *_ttyname));
131__END_DECLS
132
133#endif /* !_UTIL_H_ */
134

Archive Download this file

Revision: 2045