diff options
author | Milan Broz <gmazyland@gmail.com> | 2013-06-29 11:28:33 +0200 |
---|---|---|
committer | Milan Broz <gmazyland@gmail.com> | 2013-06-29 11:28:33 +0200 |
commit | db0f5f8d22ce2574774c9b37babae29ea35ec787 (patch) | |
tree | 296f0e14617d3f99e20dfdfe6e28d62a35f7ddc3 | |
parent | 8b162ca258818bd6485cfee6b5b6429544163df3 (diff) | |
download | cryptsetup-db0f5f8d22ce2574774c9b37babae29ea35ec787.tar.gz cryptsetup-db0f5f8d22ce2574774c9b37babae29ea35ec787.tar.bz2 cryptsetup-db0f5f8d22ce2574774c9b37babae29ea35ec787.zip |
Add kernel version to DM debug output.
-rw-r--r-- | lib/libdevmapper.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/libdevmapper.c b/lib/libdevmapper.c index 59c3453..ad6e908 100644 --- a/lib/libdevmapper.c +++ b/lib/libdevmapper.c @@ -28,6 +28,7 @@ #include <fcntl.h> #include <linux/fs.h> #include <uuid/uuid.h> +#include <sys/utsname.h> #include "internal.h" @@ -143,6 +144,16 @@ static void _dm_set_verity_compat(const char *dm_version, unsigned verity_maj, verity_maj, verity_min, verity_patch); } +static void _dm_kernel_info(void) +{ + struct utsname uts; + + if (!uname(&uts)) + log_dbg("Detected kernel %s %s %s.", + uts.sysname, uts.release, uts.machine); + +} + static int _dm_check_versions(void) { struct dm_task *dmt; @@ -153,6 +164,8 @@ static int _dm_check_versions(void) if (_dm_crypt_checked) return 1; + _dm_kernel_info(); + /* Shut up DM while checking */ _quiet_log = 1; |