"Fossies" - the Fresh Open Source Software Archive 
Member "schily-2021-09-18/sunpro/Make/include/vroot/args.h" (15 Aug 2021, 2623 Bytes) of package /linux/privat/schily-2021-09-18.tar.bz2:
1 /*
2 * CDDL HEADER START
3 *
4 * This file and its contents are supplied under the terms of the
5 * Common Development and Distribution License ("CDDL"), version 1.0.
6 * You may use this file only in accordance with the terms of version
7 * 1.0 of the CDDL.
8 *
9 * A full copy of the text of the CDDL should have accompanied this
10 * source. A copy of the CDDL is also available via the Internet at
11 * http://www.opensource.org/licenses/cddl1.txt
12 * See the License for the specific language governing permissions
13 * and limitations under the License.
14 *
15 * When distributing Covered Code, include this CDDL HEADER in each
16 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17 * If applicable, add the following below this CDDL HEADER, with the
18 * fields enclosed by brackets "[]" replaced with your own identifying
19 * information: Portions Copyright [yyyy] [name of copyright owner]
20 *
21 * CDDL HEADER END
22 */
23 /*
24 * Copyright 1999 Sun Microsystems, Inc. All rights reserved.
25 * Use is subject to license terms.
26 */
27 /*
28 * @(#)args.h 1.7 06/12/12
29 */
30
31 #pragma ident "@(#)args.h 1.7 06/12/12"
32
33 /*
34 * Copyright 2017-2018 J. Schilling
35 *
36 * @(#)args.h 1.5 21/08/15 2017-2018 J. Schilling
37 */
38
39 #ifndef _ARGS_H_
40 #define _ARGS_H_
41
42 #if defined(SCHILY_BUILD) || defined(SCHILY_INCLUDES)
43 #include <schily/unistd.h>
44 #include <schily/errno.h>
45 #include <schily/time.h>
46 #include <schily/param.h>
47 #include <schily/stdio.h>
48 #include <schily/fcntl.h> /* also sys/file.h if present */
49 #include <schily/types.h>
50 #include <schily/stat.h>
51 #else
52 #include <errno.h>
53 #include <sys/time.h>
54 #include <sys/param.h>
55 #include <stdio.h>
56 #include <fcntl.h>
57 #include <sys/types.h>
58 #include <sys/stat.h>
59 #include <sys/file.h>
60 #endif
61
62 #ifdef __never__ /* we do not need it */
63 #ifdef HAVE_SYS_SYSCALL_H
64 #include <sys/syscall.h>
65 #endif
66 #endif
67
68 typedef enum { rw_read, rw_write} rwt, *rwpt;
69
70 extern void translate_with_thunk(register char *filename, int (*thunk) (char *), pathpt path_vector, pathpt vroot_vector, rwt rw);
71
72 union Args {
73 struct { int mode;} access;
74 struct { int mode;} chmod;
75 struct { int user; int group;} chown;
76 struct { int mode;} creat;
77 struct { char **argv; char **environ;} execve;
78 struct { struct stat *buffer;} lstat;
79 struct { int mode;} mkdir;
80 struct { char *name; int mode;} mount;
81 struct { int flags; int mode;} open;
82 struct { char *buffer; int buffer_size;} readlink;
83 struct { struct stat *buffer;} stat;
84 #ifndef SUN5_0
85 struct { struct statfs *buffer;} statfs;
86 #endif
87 struct { int length;} truncate;
88 struct { struct timeval *time;} utimes;
89 };
90
91 extern union Args vroot_args;
92 extern int vroot_result;
93
94 #endif