BOOTSTRAP (kutils) functions


LIBRARY ROUTINE

kwritefile - write the contents of the data to a file

LIBRARY CALL

ssize_t kwritefile(
   const char   *filename,
   kaddr   data,
   size_t  num_write)

INPUT

OUTPUT

none

RETURN VALUE

returns the number of actual bytes written or -1 upon failure.

DESCRIPTION

This routine opens the specified and using the khoros transport mechanisms writes the contents of the data array to the specified file. An optional "num_write" can be used to specify the actual number of bytes to be written. If "num_write" is 0 then the number of bytes to be written is computed from the data by using kstrlen().

ADDITIONAL INFORMATION

none

EXAMPLES

none

SIDE EFFECTS

none

RESTRICTIONS

none

MODIFICATION

none

FILES

$BOOTSTRAP/objects/library/kutils/src/file.c

SEE ALSO

kutils(3)

COPYRIGHT

Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.