aboutsummaryrefslogtreecommitdiff
path: root/sys/ki/kbzopn.x
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
commitfa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch)
treebdda434976bc09c864f2e4fa6f16ba1952b1e555 /sys/ki/kbzopn.x
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'sys/ki/kbzopn.x')
-rw-r--r--sys/ki/kbzopn.x30
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