diff options
Diffstat (limited to 'sys/ki/kbzopn.x')
-rw-r--r-- | sys/ki/kbzopn.x | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/sys/ki/kbzopn.x b/sys/ki/kbzopn.x new file mode 100644 index 00000000..8a332b47 --- /dev/null +++ b/sys/ki/kbzopn.x @@ -0,0 +1,30 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include <mach.h> +include "ki.h" + +# KB_ZOPN -- Open a binary device. We are called only if the device does not +# reside on the local node. + +procedure kb_zopn (device, osfn, mode, chan) + +int device # device driver code +char osfn[ARB] # packed os filename +int mode # access mode +int chan # receives assigned channel + +int server +int ki_connect(), ki_sendrcv(), ki_getchan() +include "kii.com" + +begin + server = ki_connect (osfn) + p_arg[2] = mode + + if (ki_sendrcv (server, device, BF_OPN) == ERR) + chan = ERR + else if (p_arg[1] == ERR) + chan = ERR + else + chan = ki_getchan (server, p_arg[1]) +end |