diff options
author | wollman <wollman@FreeBSD.org> | 1993-12-20 19:31:41 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 1993-12-20 19:31:41 +0000 |
commit | 0628a65f26f62890353fedd1d08eabffe47362c0 (patch) | |
tree | ca8b0f390d98e6b2304c3d13ac30f1c57d0de35a /sys/kern/imgact_shell.c | |
parent | 0ffcaa99d1a0ff1b363132f44adaff425e5cc13b (diff) | |
download | FreeBSD-src-0628a65f26f62890353fedd1d08eabffe47362c0.zip FreeBSD-src-0628a65f26f62890353fedd1d08eabffe47362c0.tar.gz |
Let the linker keep track of pseudo-devices needing initialization and
image activators, rather than listing them inline in the code.
Diffstat (limited to 'sys/kern/imgact_shell.c')
-rw-r--r-- | sys/kern/imgact_shell.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/sys/kern/imgact_shell.c b/sys/kern/imgact_shell.c index 50e3d7c..42b3297 100644 --- a/sys/kern/imgact_shell.c +++ b/sys/kern/imgact_shell.c @@ -28,15 +28,22 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: shell_imgact.c,v 1.1 1993/12/12 12:23:20 davidg Exp $ + * $Id: imgact_shell.c,v 1.1 1993/12/20 16:16:46 wollman Exp $ */ #include "param.h" #include "systm.h" #include "resourcevar.h" #include "imgact.h" +#include "kernel.h" +#include "machine/endian.h" +#if BYTE_ORDER == LITTLE_ENDIAN #define SHELLMAGIC 0x2123 /* #! */ +#else +#define SHELLMAGIC 0x2321 +#endif + #define MAXSHELLCMDLEN 64 /* @@ -127,3 +134,11 @@ exec_shell_imgact(iparams) return(0); } + +/* + * Tell kern_execve.c about it, with a little help from the linker. + * Since `const' objects end up in the text segment, TEXT_SET is the + * correct directive to use. + */ +static const struct execsw shell_execsw = { exec_shell_imgact }; +TEXT_SET(execsw_set, shell_execsw); |