From c512562447150349fbae74f1aa42ad893e56bb17 Mon Sep 17 00:00:00 2001 From: Dag-Erling Smørgrav Date: Sat, 18 Feb 2006 11:25:28 +0000 Subject: Add utility functions for checking if a given kernel module is loaded, and loading it. --- libutil/libutil.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libutil') diff --git a/libutil/libutil.h b/libutil/libutil.h index 961fa1b..aefff0c 100644 --- a/libutil/libutil.h +++ b/libutil/libutil.h @@ -94,6 +94,10 @@ int realhostname(char *host, size_t hsize, const struct in_addr *ip); struct sockaddr; int realhostname_sa(char *host, size_t hsize, struct sockaddr *addr, int addrlen); + +int kld_isloaded(const char *name); +int kld_load(const char *name); + #ifdef _STDIO_H_ /* avoid adding new includes */ char *fparseln(FILE *, size_t *, size_t *, const char[3], int); #endif @@ -119,6 +123,7 @@ int pidfile_write(struct pidfh *pfh); int pidfile_close(struct pidfh *pfh); int pidfile_remove(struct pidfh *pfh); #endif + __END_DECLS #define UU_LOCK_INUSE (1) -- cgit v1.2.3-56-ge451