GVM User Suite
User tools for the GVM open source project.
Failures

Contains the list of all possible failures for functions present on the system.

These are the anticipated possible failures a function can experience in our codebase.

Global device_exists (const char *device_name)
Invalid File - The only way this function can fail is by not having the file in question exist.
Global get_major (const char *device)

Invalid Device - In the case of an invalid device being passed it will return -1.

Device List Not Found - Device list is not found, this can occur on unsupported operating systems.

Global get_param (const char *filename, const char *parameter)
Param File Not Found - Check if the device driver is loaded correctly.
Global nv_open (int32_t major, uint16_t minor, const char *path, const char *proc_path)
Not Created - Normally this is the case if the NVIDIA driver is not loaded.
Global nv_open_dev (uint16_t minor)
Not Created - Normally this is the case if the NVIDIA driver is not loaded.
Global nv_open_mdev (uint16_t minor)
Not Created - Normally this is the case if the NVIDIA driver is not loaded.
Global rm_alloc_res (int fd, struct NvResource *parent, uint32_t object, uint32_t rm_class, void *data)

Invalid File Descriptor - Occurs when fd is -1.

Incorrect File Descriptor - Occurs when fd is an incorrect descriptor.

Global rm_ctrl_res (int fd, uint32_t client, uint32_t device, uint32_t command, void *data, uint32_t size)

Invalid File Descriptor - Occurs when fd is -1.

Incorrect File Descriptor - Occurs when the fd is an incorrect file descriptor.

RM Failure - Occurs when incorrect information is placed.

Global rm_free_res (int fd, struct NvResource *object)

Invalid File Descriptor - Occurs when fd is -1.

Incorrect File Descriptor - Occurs when the fd is an incorrect file descriptor.

Global rm_version_check (int ctl_fd, uint8_t ignore_version, const char *version)

Invalid File Descriptor - This occurs when ctl_fd is -1.

Invalid RM Version - This will occur when there is a mismatch on the driver and the user suite.

Seg Fault - This occurs if version is not pointing to NULL but is pointing to a previously allocated memory address.