diff options
author | Manuel Bentele | 2020-10-12 09:11:17 +0200 |
---|---|---|
committer | Manuel Bentele | 2020-10-12 09:11:17 +0200 |
commit | b2db527b9674174b704aaa297afa257215d8a290 (patch) | |
tree | 0ff37200d76c65178d220a61ededcb2344645b63 | |
parent | Updated README with required build tools and libraries (diff) | |
download | xloop-b2db527b9674174b704aaa297afa257215d8a290.tar.gz xloop-b2db527b9674174b704aaa297afa257215d8a290.tar.xz xloop-b2db527b9674174b704aaa297afa257215d8a290.zip |
Print version string in kernel log
-rw-r--r-- | CMakeLists.txt | 3 | ||||
-rw-r--r-- | kernel/CMakeLists.txt | 2 | ||||
-rw-r--r-- | kernel/xloop_main.c | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 3095d7e..fa32699 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,7 +31,8 @@ endif() # get versions to define project version get_kernel_version(LINUX_KERNEL_VERSION) get_repository_version(REPOSITORY_VERSION) -set(VERSION ${LINUX_KERNEL_VERSION}-${REPOSITORY_VERSION}) +set(VERSION ${LINUX_KERNEL_VERSION}-${REPOSITORY_VERSION} + CACHE STRING "Version of xloop package") # define packaging if Release build is enabled if(${CMAKE_BUILD_TYPE} MATCHES Release) diff --git a/kernel/CMakeLists.txt b/kernel/CMakeLists.txt index 0e867f6..0cf209c 100644 --- a/kernel/CMakeLists.txt +++ b/kernel/CMakeLists.txt @@ -19,7 +19,7 @@ message(STATUS "Path to Linux kernel modules to compile against is " ${KERNEL_DI message(STATUS "Minor number for the xloop-control device is " ${XLOOP_CTRL_MINOR}) # set C flags for a Linux kernel module -set(KERNEL_C_FLAGS "-DCONFIG_BLK_DEV_XLOOP_MIN_COUNT=${BLK_DEV_XLOOP_MIN_COUNT} -DXLOOP_MAJOR=${XLOOP_MAJOR} -DXLOOP_CTRL_MINOR=${XLOOP_CTRL_MINOR}" +set(KERNEL_C_FLAGS "-DCONFIG_BLK_DEV_XLOOP_MIN_COUNT=${BLK_DEV_XLOOP_MIN_COUNT} -DXLOOP_MAJOR=${XLOOP_MAJOR} -DXLOOP_CTRL_MINOR=${XLOOP_CTRL_MINOR} -DVERSION=${VERSION}" CACHE STRING "C flags to be used for building the kernel module") # set C flags for the debug mode of a Linux kernel module set(KERNEL_C_FLAGS_DEBUG "-g -DDEBUG" diff --git a/kernel/xloop_main.c b/kernel/xloop_main.c index 703044f..001b759 100644 --- a/kernel/xloop_main.c +++ b/kernel/xloop_main.c @@ -2187,7 +2187,7 @@ static int __init xloop_init(void) xloop_add(&xlo, i); mutex_unlock(&xloop_ctl_mutex); - pr_info("module loaded\n"); + pr_info("module in version %s loaded\n", __stringify(VERSION)); return 0; misc_out: |