fs_crypto_file_get_domain()

Get the domain of a file or directory

Synopsis:

#include <fs_crypto_api.h>
#include <sys/fs_crypto.h>

int fs_crypto_file_get_domain( const char *path,
                               int *pdomain,
                               int *preply );

Arguments:

path
The path to the file or directory whose domain you want to get.
domain
A pointer to a location where the function can store the domain.
preply
A pointer to a location where the function can store additional success or error information.

Library:

libfscrypto

Use the -l fscrypto option to qcc to link against this library.

Description:

The fs_crypto_file_get_domain() function gets the domain number for the given file or directory, storing the number in the location that domain points to.

Note: In order to use filesystem encryption, download the Encrypted Filesystem package from the QNX Software Center.

This function sets the variable pointed to by preply to one of the following values:

FS_CRYPTO_REPLY_COMPLETE
The function retrieved the domain number.
FS_CRYPTO_REPLY_INVALID
The command wasn't completed successfully.
FS_CRYPTO_REPLY_NOT_ASSIGNED
The file or directory hasn't been assigned to a domain.

Returns:

EOK
Success.
EINVAL
Invalid arguments.

This function can also return any of the errors indicated by devctl() or open().

Classification:

QNX Neutrino

Safety:  
Cancellation point Yes
Interrupt handler No
Signal handler No
Thread Yes