BOOTSTRAP (kutils) functions
LIBRARY ROUTINE
kwrite - write output to a transport descriptor
LIBRARY CALL
ssize_t kwrite(
int id,
kaddr buf,
size_t nbytes)
INPUT
- id - the file id to be read which was opened earlier
with kopen().
- buf - the buffer to write the data from
- nbytes - the number of bytes to be written
OUTPUT
none
RETURN VALUE
The number of bytes written, or -1 when
an error is encountered.
DESCRIPTION
This function is a replacement for the system "write"
call. The only difference is that kwrite() supports
more than just files, it supports other data transports
as well, such as shared memory, pipes, files, etc.
The routine will write nbytes from the character array
"buf" to the appropriate transport mechanism specified by
id. If not all nbytes can be read then the kread()
routine returns the number of bytes actually read.
ADDITIONAL INFORMATION
none
EXAMPLES
none
SIDE EFFECTS
none
RESTRICTIONS
none
MODIFICATION
none
FILES
$BOOTSTRAP/objects/library/kutils/src/ktransport.c
SEE ALSO
kutils(3)
COPYRIGHT
Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.