10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe/*
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * CDDL HEADER START
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe *
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * The contents of this file are subject to the terms of the
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Common Development and Distribution License (the "License").
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * You may not use this file except in compliance with the License.
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe *
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * or http://www.opensolaris.org/os/licensing.
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * See the License for the specific language governing permissions
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * and limitations under the License.
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe *
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * When distributing Covered Code, include this CDDL HEADER in each
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * If applicable, add the following below this CDDL HEADER, with the
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * fields enclosed by brackets "[]" replaced with your own identifying
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * information: Portions Copyright [yyyy] [name of copyright owner]
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe *
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * CDDL HEADER END
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe */
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe/*
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Copyright 1999 Sun Microsystems, Inc. All rights reserved.
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Use is subject to license terms.
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe */
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe#ifndef _ARGS_H_
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe#define _ARGS_H_
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe#include <sys/syscall.h>
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe#include <errno.h>
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe#include <sys/time.h>
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe#include <sys/param.h>
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe#include <stdio.h>
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe#include <fcntl.h>
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe#include <sys/types.h>
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe#include <sys/stat.h>
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe#include <sys/file.h>
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowetypedef enum { rw_read, rw_write} rwt, *rwpt;
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Loweextern void translate_with_thunk(register char *filename, int (*thunk) (char *), pathpt path_vector, pathpt vroot_vector, rwt rw);
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Loweunion Args {
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe struct { int mode;} access;
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe struct { int mode;} chmod;
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe struct { int user; int group;} chown;
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe struct { int mode;} creat;
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe struct { char **argv; char **environ;} execve;
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe struct { struct stat *buffer;} lstat;
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe struct { int mode;} mkdir;
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe struct { char *name; int mode;} mount;
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe struct { int flags; int mode;} open;
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe struct { char *buffer; int buffer_size;} readlink;
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe struct { struct stat *buffer;} stat;
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe struct { int length;} truncate;
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe struct { struct timeval *time;} utimes;
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe};
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Loweextern union Args vroot_args;
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Loweextern int vroot_result;
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe#endif