| 1 |
#include <glib.h> |
| 2 |
|
| 3 |
#ifndef BD_UTILS_MODULE |
| 4 |
#define BD_UTILS_MODULE |
| 5 |
|
| 6 |
GQuark bd_utils_module_error_quark (void); |
| 7 |
#define BD_UTILS_MODULE_ERROR bd_utils_module_error_quark () |
| 8 |
typedef enum { |
| 9 |
BD_UTILS_MODULE_ERROR_KMOD_INIT_FAIL, |
| 10 |
BD_UTILS_MODULE_ERROR_FAIL, |
| 11 |
BD_UTILS_MODULE_ERROR_NOEXIST, |
| 12 |
BD_UTILS_MODULE_ERROR_MODULE_CHECK_ERROR, |
| 13 |
BD_UTILS_MODULE_ERROR_INVALID_PLATFORM, |
| 14 |
} BDUtilsModuleError; |
| 15 |
|
| 16 |
typedef struct { |
| 17 |
guint major; |
| 18 |
guint minor; |
| 19 |
guint micro; |
| 20 |
} BDUtilsLinuxVersion; |
| 21 |
|
| 22 |
gboolean bd_utils_have_kernel_module (const gchar *module_name, GError **error); |
| 23 |
gboolean bd_utils_load_kernel_module (const gchar *module_name, const gchar *options, GError **error); |
| 24 |
gboolean bd_utils_unload_kernel_module (const gchar *module_name, GError **error); |
| 25 |
|
| 26 |
BDUtilsLinuxVersion * bd_utils_get_linux_version (GError **error); |
| 27 |
gint bd_utils_check_linux_version (guint major, guint minor, guint micro); |
| 28 |
|
| 29 |
#endif /* BD_UTILS_MODULE */ |