From 1b881841040775651de659ef6ac037ed75feeab1 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Mon, 29 Nov 2010 11:05:15 +0000 Subject: [PATCH] Remove printing of LCK_CACHE LCK_CACHE is defined as 0x100 so it cannot be passed through unsigned char parameter - remove it from the sprintf code. If the LCK_CLUSTER should be printed here - lot of code need to be reworked - so adding FIXME comment. --- daemons/clvmd/lvm-functions.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/daemons/clvmd/lvm-functions.c b/daemons/clvmd/lvm-functions.c index 20b25a6fd..7fda99287 100644 --- a/daemons/clvmd/lvm-functions.c +++ b/daemons/clvmd/lvm-functions.c @@ -44,6 +44,10 @@ struct lv_info { int lock_mode; }; +/* + * FIXME: 8bit value passed here - + * so only LCK_XXX defines < 0x100 can be decoded + */ static const char *decode_locking_cmd(unsigned char cmdl) { static char buf[128]; @@ -109,12 +113,11 @@ static const char *decode_locking_cmd(unsigned char cmdl) break; } - sprintf(buf, "0x%x %s (%s|%s%s%s%s%s%s)", cmdl, command, type, scope, + sprintf(buf, "0x%x %s (%s|%s%s%s%s%s)", cmdl, command, type, scope, cmdl & LCK_NONBLOCK ? "|NONBLOCK" : "", cmdl & LCK_HOLD ? "|HOLD" : "", cmdl & LCK_LOCAL ? "|LOCAL" : "", - cmdl & LCK_CLUSTER_VG ? "|CLUSTER_VG" : "", - cmdl & LCK_CACHE ? "|CACHE" : ""); + cmdl & LCK_CLUSTER_VG ? "|CLUSTER_VG" : ""); return buf; }