Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most
[dragonfly.git] / sys / i386 / boot / dosboot / exec.h
1 /*-\r
2  * Copyright (c) 1992, 1993\r
3  *      The Regents of the University of California.  All rights reserved.\r
4  * (c) UNIX System Laboratories, Inc.\r
5  * All or some portions of this file are derived from material licensed\r
6  * to the University of California by American Telephone and Telegraph\r
7  * Co. or Unix System Laboratories, Inc. and are reproduced herein with\r
8  * the permission of UNIX System Laboratories, Inc.\r
9  *\r
10  * Redistribution and use in source and binary forms, with or without\r
11  * modification, are permitted provided that the following conditions\r
12  * are met:\r
13  * 1. Redistributions of source code must retain the above copyright\r
14  *    notice, this list of conditions and the following disclaimer.\r
15  * 2. Redistributions in binary form must reproduce the above copyright\r
16  *    notice, this list of conditions and the following disclaimer in the\r
17  *    documentation and/or other materials provided with the distribution.\r
18  * 3. All advertising materials mentioning features or use of this software\r
19  *    must display the following acknowledgement:\r
20  *      This product includes software developed by the University of\r
21  *      California, Berkeley and its contributors.\r
22  * 4. Neither the name of the University nor the names of its contributors\r
23  *    may be used to endorse or promote products derived from this software\r
24  *    without specific prior written permission.\r
25  *\r
26  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\r
27  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
28  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
29  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\r
30  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\r
31  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\r
32  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\r
33  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\r
34  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\r
35  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\r
36  * SUCH DAMAGE.\r
37  *\r
38  *      @(#)exec.h      8.3 (Berkeley) 1/21/94\r
39  * $FreeBSD: src/sys/i386/boot/dosboot/exec.h,v 1.5 1999/08/28 00:43:23 peter Exp $\r
40  * $DragonFly: src/sys/i386/boot/dosboot/Attic/exec.h,v 1.2 2003/06/17 04:28:34 dillon Exp $\r
41  */\r
42 \r
43 #ifndef _SYS_EXEC_H_\r
44 #define _SYS_EXEC_H_\r
45 \r
46 /*\r
47  * The following structure is found at the top of the user stack of each\r
48  * user process. The ps program uses it to locate argv and environment\r
49  * strings. Programs that wish ps to display other information may modify\r
50  * it; normally ps_argvstr points to the text for argv[0], and ps_nargvstr\r
51  * is the same as the program's argc. The fields ps_envstr and ps_nenvstr\r
52  * are the equivalent for the environment.\r
53  */\r
54 struct ps_strings {\r
55         char    *ps_argvstr;    /* first of 0 or more argument strings */\r
56         long    ps_nargvstr;    /* the number of argument strings */\r
57         char    *ps_envstr;     /* first of 0 or more environment strings */\r
58         long    ps_nenvstr;     /* the number of environment strings */\r
59 };\r
60 \r
61 /*\r
62  * Address of ps_strings structure (in user space).\r
63  */\r
64 #define SPARE_USRSPACE  256\r
65 #define PS_STRINGS ((struct ps_strings *) \\r
66                 (USRSTACK - sizeof(struct ps_strings) - SPARE_USRSPACE))\r
67 \r
68 /*\r
69  * Arguments to the exec system call.\r
70  */\r
71 struct execve_args {\r
72         char    *fname;\r
73         char    **argv;\r
74         char    **envv;\r
75 };\r
76 \r
77 struct execsw {\r
78         int (*ex_imgact)(void * /* struct image_params * */);\r
79         const char *ex_name;\r
80 };\r
81 \r
82 #ifdef KERNEL\r
83 extern const struct execsw **execsw;\r
84 \r
85 #endif\r
86 \r
87 #include "mexec.h"\r
88 \r
89 #endif\r