BOOTSTRAP (kutils) functions


LIBRARY ROUTINE

kopen - open or create a file for reading and/or writing

LIBRARY CALL

int kopen(
  const char *path,
  int         flags,
  mode_t      mode)

INPUT

OUTPUT

none

RETURN VALUE

the kfile id on success, -1 otherwise

DESCRIPTION

This function is a replacement for the system "open" call. The only difference is that kopen() supports more than just files, it supports other data transports as well. The path should be in the form of an identifier, followed by an "=" equal indicator, and then the transport token. ie) a Shared memory path would look like:

"shm=1032"

If a file was desired then either

"/usr/tmp/vadd1235" "file=/usr/tmp/vadd1235"

will work.

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.