Skip to contentSkip to conversation

master - dmsetup: debug print

PATCH Zdenek Kabelac 1 participant 1 message Aug 20, 2019

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=a18f562913aaebf4587531fb40082718ec504f7a
Commit:        a18f562913aaebf4587531fb40082718ec504f7a
Parent:        30a98e4d6710a543692d40d11428ae4baea11b7b
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Fri Aug 16 23:49:38 2019 +0200
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Tue Aug 20 12:50:44 2019 +0200

dmsetup: debug print

Udev debugging is a bit tricky, so to more easily pair cookie ID, which is the lowest 16 bit - print cookie as hexa number. This simplify pairing of processed cookies while the 'higher bit flags' are changed for the same cookie.

---
 WHATS_NEW_DM             |    1 +
 libdm/dm-tools/dmsetup.c |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
WHATS_NEW_DM +1 -0
index 2c0c7ec..60a2b53 100644
@@ -1,5 +1,6 @@
 Version 1.02.165 - 
 =================================
+  Add debug of dmsetup udevcomplete with hexa print DM_COOKIE_COMPLETED.
   Fix versioning of dm_stats_create_region and dm_stats_create_region.
 
 Version 1.02.163 - 15th June 2019
libdm/dm-tools/dmsetup.c +1 -0
index 928b599..a38df6b 100644
@@ -1695,6 +1695,7 @@ static int _udevcomplete(CMD_ARGS)
 	if (!(cookie = _get_cookie_value(argv[0])))
 		return_0;
 
+	printf("DM_COOKIE_COMPLETED=0x%-10x", cookie);
 	/*
 	 * Strip flags from the cookie and use cookie magic instead.
 	 * If the cookie has non-zero prefix and the base is zero then