Pass file advice to the filesystem
#include <sys/dcmd_all.h> #define DCMD_ALL_FADVISE __DIOT(_DCMD_ALL, 6, struct _fadvise)
Argument | Value |
---|---|
filedes | A file descriptor that you obtained by opening the device. |
dcmd | DCMD_ALL_FADVISE |
dev_data_ptr | A pointer to a struct _fadvise with the advice filled in (see below). |
n_bytes | sizeof(struct _fadvise) |
dev_info_ptr | NULL |
This command passes file advice to the filesystem. Clients usually use the posix_fadvise() cover function to generate this request:
posix_fadvise(fd, offset, len, advice);
A pointer to a struct _fadvise with the advice filled in. This structure is defined as:
struct _fadvise { int advice; int spare; off64_t offset; off64_t len; };
The members include the following:
None.
struct _fadvise a; a.advice = advice; a.offset = offset; a.len = len; a.spare = 0; if(devctl(fd, DCMD_ALL_FADVISE, &a, sizeof a, NULL) != EOK) { /* Error */ }
devctl(), posix_fadvise() in the QNX Neutrino C Library Reference