GVM User Suite
User tools for the GVM open source project.
|
#include <stdint.h>
Go to the source code of this file.
Functions | |
uint8_t | device_exists (const char *device_name) |
Does a device file exist? More... | |
int32_t | get_major (const char *device) |
Gets the device major id from /proc/devices. More... | |
int32_t | get_param (const char *filename, const char *parameter) |
Gets a parameter from a driver param file. More... | |
uint8_t device_exists | ( | const char * | device_name | ) |
Does a device file exist?
This function provides us information regarding if a device exists on the system, it automatically prepends the /dev/ prefix if the prefix is not found in the string.
device_name | - The name of the device that we are checking if it exists or not in the /dev/ filesystem. |
Definition at line 30 of file device.c.
int32_t get_major | ( | const char * | device | ) |
Gets the device major id from /proc/devices.
This function is used to provide us information regarding what is the major number for a particular for a device.
device | - Device we want to create. |
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.
Definition at line 42 of file device.c.
int32_t get_param | ( | const char * | filename, |
const char * | parameter | ||
) |
Gets a parameter from a driver param file.
This function is designed to give us several parameters by which we can determine how to create the necessary character devices.
filename | - File name for the parameter file. |
parameter | - Driver parameter to search for. |
Definition at line 71 of file device.c.