Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ cpcmd(4) — AIX PS/2 1.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ioctlx, ioctl, gtty, stty

open, openx, creat

write, writex

cpcmd



CPCMD(4,F)                  AIX Technical Reference                  CPCMD(4,F)



-------------------------------------------------------------------------------
cpcmd



PURPOSE

Supports the IBM VM CP system interface.

# include <sys/devinfo.h>
# include <sys/b370/cpcmd.h>

DESCRIPTION

The AIX/370 system runs as a guest under VM.  At times, it is desirable for
programs to communicate through this interface.  The device used to obtain this
interface to VM is /dev/cpcmd.  The cpcmd special file is unique to AIX/370.
There is only one such device per system.

Only the superuser can open this device.  This avoids giving non-privileged AIX
users the full privileges of the AIX/370 virtual machine within the realm of
VM.  Most I/O through this device is performed via ioctl commands describe
below.  It is possible, however, to write to the device a specific CP command.
This command should be in ASCII, but otherwise in the format required by VM
(for instance, all uppercase letters).

There is one IOCTL operation available besides the standard IOCTYPE and IOCINFO
commands.  This is the CPCMD ioctl command.  The CPCMD ioctl is of the form:

     ioctl (fd, CPCMD, arg)
     struct cpcmds *arg;

The cpcmd structure is declared as follows:

     struct cpcmds {
       int   inlen;
       int   maxoutlen;
       char  *inbuf;
       char  *outbuf;
       int   *outlen;
     };

The inbuf contains the command to be run, and the outbuf is to store the result
returned by CP.  This method allows the execution of each CP command to be
atomic.

ERROR CONDITIONS

In addition to the errors listed in "ioctlx, ioctl, gtty, stty," "open, openx,
creat," and  "write, writex," system calls to this device can fail in the
following circumstances:




Processed November 7, 1990        CPCMD(4,F)                                  1





CPCMD(4,F)                  AIX Technical Reference                  CPCMD(4,F)



EPERM   Attempt to open the device by non-superuser.

EINVAL  The CP command is not valid.

RELATED INFORMATION

In this book:  "ioctlx, ioctl, gtty, stty," "open, openx, creat," and "write,
writex."

The cpcmd command in AIX Operating System Commands Reference.













































Processed November 7, 1990        CPCMD(4,F)                                  2



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026