utils: Introduce functions for kernel module manipulation

virKModConfig()        - Return a buffer containing kernel module configuration
virKModLoad()          - Load a specific module into the kernel configuration
virKModUnload()        - Unload a specific module from the kernel configuration
virKModIsBlacklisted() - Determine whether a module is blacklisted within
                         the kernel configuration
This commit is contained in:
John Ferlan
2014-01-29 09:36:26 -05:00
parent 0d0a7bf45a
commit 4a2179ea92
5 changed files with 229 additions and 0 deletions

View File

@@ -416,6 +416,8 @@ AC_PATH_PROG([UDEVSETTLE], [udevsettle], [],
[/sbin:/usr/sbin:/usr/local/sbin:$PATH])
AC_PATH_PROG([MODPROBE], [modprobe], [modprobe],
[/sbin:/usr/sbin:/usr/local/sbin:$PATH])
AC_PATH_PROG([RMMOD], [rmmod], [rmmod],
[/sbin:/usr/sbin:/usr/local/sbin:$PATH])
AC_PATH_PROG([OVSVSCTL], [ovs-vsctl], [ovs-vsctl],
[/sbin:/usr/sbin:/usr/local/sbin:$PATH])
AC_PATH_PROG([SCRUB], [scrub], [scrub],
@@ -444,6 +446,10 @@ if test -n "$MODPROBE"; then
AC_DEFINE_UNQUOTED([MODPROBE],["$MODPROBE"],
[Location or name of the modprobe program])
fi
if test -n "$RMMOD"; then
AC_DEFINE_UNQUOTED([RMMOD],["$RMMOD"],
[Location or name of the rmmod program])
fi
AC_DEFINE_UNQUOTED([SCRUB],["$SCRUB"],
[Location or name of the scrub program (for wiping algorithms)])