aboutsummaryrefslogtreecommitdiff
path: root/sys/ki/kfacss.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/kfacss.x
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'sys/ki/kfacss.x')
-rw-r--r--sys/ki/kfacss.x35
1 files changed, 35 insertions, 0 deletions
diff --git a/sys/ki/kfacss.x b/sys/ki/kfacss.x
new file mode 100644
index 00000000..5634e099
--- /dev/null
+++ b/sys/ki/kfacss.x
@@ -0,0 +1,35 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include <mach.h>
+include "ki.h"
+
+# KFACSS -- Determine the accessibility and type of a file.
+
+procedure kfacss (osfn, mode, type, status)
+
+char osfn[ARB] # packed os filename
+int mode # access mode or null if don't care
+int type # file type or null if don't care
+int status # answer; yes or no
+
+int server
+int ki_connect(), ki_sendrcv()
+include "kii.com"
+
+begin
+ server = ki_connect (osfn)
+
+ if (server == NULL) {
+ call strpak (p_sbuf[p_arg[1]], p_sbuf, SZ_SBUF)
+ call zfacss (p_sbuf, mode, type, status)
+
+ } else {
+ p_arg[2] = mode
+ p_arg[3] = type
+
+ if (ki_sendrcv (server, KI_ZFACSS, 0) == ERR)
+ status = ERR
+ else
+ status = p_arg[1]
+ }
+end