xref: /illumos-gate/usr/src/cmd/make/include/vroot/args.h (revision e7afc443)
110d63b7dSRichard Lowe /*
210d63b7dSRichard Lowe  * CDDL HEADER START
310d63b7dSRichard Lowe  *
410d63b7dSRichard Lowe  * The contents of this file are subject to the terms of the
510d63b7dSRichard Lowe  * Common Development and Distribution License (the "License").
610d63b7dSRichard Lowe  * You may not use this file except in compliance with the License.
710d63b7dSRichard Lowe  *
810d63b7dSRichard Lowe  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
910d63b7dSRichard Lowe  * or http://www.opensolaris.org/os/licensing.
1010d63b7dSRichard Lowe  * See the License for the specific language governing permissions
1110d63b7dSRichard Lowe  * and limitations under the License.
1210d63b7dSRichard Lowe  *
1310d63b7dSRichard Lowe  * When distributing Covered Code, include this CDDL HEADER in each
1410d63b7dSRichard Lowe  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1510d63b7dSRichard Lowe  * If applicable, add the following below this CDDL HEADER, with the
1610d63b7dSRichard Lowe  * fields enclosed by brackets "[]" replaced with your own identifying
1710d63b7dSRichard Lowe  * information: Portions Copyright [yyyy] [name of copyright owner]
1810d63b7dSRichard Lowe  *
1910d63b7dSRichard Lowe  * CDDL HEADER END
2010d63b7dSRichard Lowe  */
2110d63b7dSRichard Lowe /*
2210d63b7dSRichard Lowe  * Copyright 1999 Sun Microsystems, Inc. All rights reserved.
2310d63b7dSRichard Lowe  * Use is subject to license terms.
2410d63b7dSRichard Lowe  */
2510d63b7dSRichard Lowe 
2610d63b7dSRichard Lowe 
2710d63b7dSRichard Lowe #ifndef _ARGS_H_
28*e7afc443SToomas Soome #define	_ARGS_H_
2910d63b7dSRichard Lowe 
3010d63b7dSRichard Lowe #include <sys/syscall.h>
3110d63b7dSRichard Lowe #include <errno.h>
3210d63b7dSRichard Lowe #include <sys/time.h>
3310d63b7dSRichard Lowe #include <sys/param.h>
3410d63b7dSRichard Lowe #include <stdio.h>
3510d63b7dSRichard Lowe #include <fcntl.h>
3610d63b7dSRichard Lowe #include <sys/types.h>
3710d63b7dSRichard Lowe #include <sys/stat.h>
3810d63b7dSRichard Lowe #include <sys/file.h>
3910d63b7dSRichard Lowe 
4010d63b7dSRichard Lowe typedef enum { rw_read, rw_write} rwt, *rwpt;
4110d63b7dSRichard Lowe 
42*e7afc443SToomas Soome extern	void	translate_with_thunk(char *, int (*) (char *), pathpt, pathpt,
43*e7afc443SToomas Soome 	rwt);
4410d63b7dSRichard Lowe 
4510d63b7dSRichard Lowe union Args {
46*e7afc443SToomas Soome 	struct {
47*e7afc443SToomas Soome 		int mode;
48*e7afc443SToomas Soome 	} access;
49*e7afc443SToomas Soome 	struct {
50*e7afc443SToomas Soome 		int mode;
51*e7afc443SToomas Soome 	} chmod;
52*e7afc443SToomas Soome 	struct {
53*e7afc443SToomas Soome 		int user; int group;
54*e7afc443SToomas Soome 	} chown;
55*e7afc443SToomas Soome 	struct {
56*e7afc443SToomas Soome 		int mode;
57*e7afc443SToomas Soome 	} creat;
58*e7afc443SToomas Soome 	struct {
59*e7afc443SToomas Soome 		char **argv; char **environ;
60*e7afc443SToomas Soome 	} execve;
61*e7afc443SToomas Soome 	struct {
62*e7afc443SToomas Soome 		struct stat *buffer;
63*e7afc443SToomas Soome 	} lstat;
64*e7afc443SToomas Soome 	struct {
65*e7afc443SToomas Soome 		int mode;
66*e7afc443SToomas Soome 	} mkdir;
67*e7afc443SToomas Soome 	struct {
68*e7afc443SToomas Soome 		char *name; int mode;
69*e7afc443SToomas Soome 	} mount;
70*e7afc443SToomas Soome 	struct {
71*e7afc443SToomas Soome 		int flags; int mode;
72*e7afc443SToomas Soome 	} open;
73*e7afc443SToomas Soome 	struct {
74*e7afc443SToomas Soome 		char *buffer; int buffer_size;
75*e7afc443SToomas Soome 	} readlink;
76*e7afc443SToomas Soome 	struct {
77*e7afc443SToomas Soome 		struct stat *buffer;
78*e7afc443SToomas Soome 	} stat;
79*e7afc443SToomas Soome 	struct {
80*e7afc443SToomas Soome 		int length;
81*e7afc443SToomas Soome 	} truncate;
82*e7afc443SToomas Soome 	struct {
83*e7afc443SToomas Soome 		struct timeval *time;
84*e7afc443SToomas Soome 	} utimes;
8510d63b7dSRichard Lowe };
8610d63b7dSRichard Lowe 
8710d63b7dSRichard Lowe extern	union Args	vroot_args;
8810d63b7dSRichard Lowe extern	int		vroot_result;
8910d63b7dSRichard Lowe 
90*e7afc443SToomas Soome #endif /* _ARGS_H_ */
91