mirror of
https://github.com/rtlsdrblog/rtl-sdr-blog.git
synced 2025-07-15 05:43:17 +02:00
lib: don't detach kernel driver by default
Since this feature also disconnects running instances of librtlsdr that claimed the device, it is now disabled by default and can only be enabled at compile time. To enable it when building with cmake: cmake . -DDETACH_KERNEL_DRIVER=ON To enable it when building with automake: ./configure --enable-driver-detach Signed-off-by: Steve Markgraf <steve@steve-m.de>
This commit is contained in:
@ -111,6 +111,14 @@ else (INSTALL_UDEV_RULES)
|
||||
message (STATUS "Udev rules not being installed, install them with -DINSTALL_UDEV_RULES=ON")
|
||||
endif (INSTALL_UDEV_RULES)
|
||||
|
||||
option(DETACH_KERNEL_DRIVER "Detach kernel driver if loaded" OFF)
|
||||
if (DETACH_KERNEL_DRIVER)
|
||||
message (STATUS "Building with kernel driver detaching enabled")
|
||||
add_definitions(-DDETACH_KERNEL_DRIVER=1)
|
||||
else (DETACH_KERNEL_DRIVER)
|
||||
message (STATUS "Building with kernel driver detaching disabled, use -DDETACH_KERNEL_DRIVER=ON to enable")
|
||||
endif (DETACH_KERNEL_DRIVER)
|
||||
|
||||
########################################################################
|
||||
# Add subdirectories
|
||||
########################################################################
|
||||
|
Reference in New Issue
Block a user