Open a configuration file
#include <cfgopen.h>
FILE * fcfgopen( const char * path,
const char * mode,
int location,
const char * historical,
char * namebuf,
int nblen );
- path
- The name of the configuration file that you want to open.
- mode
- A string that describes the mode to open in; see
fopen().
- location
- Flags that describe how the path is constructed.
See
“Search condition flags”
in the documentation for cfgopen().
- historical
- A optional file to open as a last resort if none of the criteria for
finding the path is met.
This string works like a path search order, and lets you search more
than one location.
You can also specify %H to substitute the hostname value into
the string.
Specify NULL to ignore this option.
- namebuf
- A buffer to save the pathname in.
Specify NULL to ignore this option.
- nblen
- The length of the buffer pointed to by namebuf.
Specify 0 to ignore this option.
libc
Use the -l c option to
qcc
to link against this library.
This library is usually included automatically.
|
This function is in libc.a, but not in libc.so
(in order to save space). |
The fcfgopen() function is similar to
cfgopen()
with these exceptions:
- The CFGFILE_NOFD flag isn't valid.
- The values for flags described in
open()
aren't valid.
A valid fd if CFGFILE_NOFD isn't specified,
a nonnegative value if CFGFILE_NOFD is specified,
or -1 if an error occurs.
QNX Neutrino
Safety: | |
Cancellation point |
Yes |
Interrupt handler |
No |
Signal handler |
Yes |
Thread |
Yes |
cfgopen(),
confstr()
mib.txt,
snmpd.conf
in the Utilities Reference