aboutsummaryrefslogtreecommitdiff
path: root/sys/ki/ktzstt.x
blob: c7ca9463bf645aeb1ea0c2f3e1f71e9fd4fe53c7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.

include	<mach.h>
include	<config.h>
include	"ki.h"

# KT_ZSTT -- Get file status on a text device.  We are called only if the
# device does not reside on the local node.

procedure kt_zstt (device, chan, what, lvalue)

int	device			# device driver code
int	chan			# channel assigned device
int	what			# file parameter to be returned
long	lvalue			# receives the parameter value

int	server
int	ki_sendrcv()
long	ki_decode()
include	"kichan.com"
include	"kii.com"

begin
	server   = k_node[chan]
	p_arg[1] = k_oschan[chan]
	p_arg[2] = what

	if (ki_sendrcv (server, device, TX_STT) == ERR)
	    lvalue = ERR
	else
	    lvalue = ki_decode (p_sbuf, NCHARS_LONG)
end