From fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 8 Jul 2015 20:46:52 -0400 Subject: Initial commit --- unix/boot/bootlib/oscmd.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 unix/boot/bootlib/oscmd.c (limited to 'unix/boot/bootlib/oscmd.c') diff --git a/unix/boot/bootlib/oscmd.c b/unix/boot/bootlib/oscmd.c new file mode 100644 index 00000000..0f9c9755 --- /dev/null +++ b/unix/boot/bootlib/oscmd.c @@ -0,0 +1,27 @@ +/* Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + */ + +#include +#include "bootlib.h" + +#define SZ_CMD 2048 + +/* OS_CMD -- Send a command to the host system. + */ +int +os_cmd (char *cmd) +{ + PKCHAR x_cmd[SZ_CMD+1]; + PKCHAR nullstr[1]; + XINT status; + extern int ZOSCMD(); + + + strncpy ((char *)x_cmd, cmd, SZ_CMD); + nullstr[0] = 0; + + /* Terminate the parent process if the OS command is interrupted. + */ + ZOSCMD (x_cmd, nullstr, nullstr, nullstr, &status); + return (status); +} -- cgit