CrossCore XA
Revision: 1.0
Programmers Guide
Date: Jul 1, 10
Return value
The new file descriptor if successful or -1 if an error occurred. In case of error, errno is set
appropriately.
Example
See example of ioctl.
9.3.2.
close
Description
Closes the file descriptor
Include files
#include <unistd.h>
Syntax
int close(
int fd
)
Parameters
fd File
descriptor
Return value
Returns zero on success. In case of errors, -1 is returned and errno is set appropriately.
Example
See example of ioctl.
9.3.3.
ioctl
Description
The ioctl function calls are used for accessing the Watchdog. The available ioctl operations are
summarized in the table below.
Define
Description
WDIOC_KEEPALIVE
Pat the dog to keep it from waking
WDIOC_GETTIMEOUT
Get the current watchdog timeout
Include files
#include <sys/ioctl.h>
#include <linux/watchdog.h>
Syntax
int ioctl(
int fd,
int request,
void *argp
)
www.crosscontrol.com
47