[lvm-devel] LVM2/daemons/clvmd lvm-functions.c
zkabelac at sourceware.org
zkabelac at sourceware.org
Mon Nov 29 11:05:15 UTC 2010
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac at sourceware.org 2010-11-29 11:05:15
Modified files:
daemons/clvmd : lvm-functions.c
Log message:
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.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/lvm-functions.c.diff?cvsroot=lvm2&r1=1.100&r2=1.101
--- LVM2/daemons/clvmd/lvm-functions.c 2010/11/23 01:55:58 1.100
+++ LVM2/daemons/clvmd/lvm-functions.c 2010/11/29 11:05:15 1.101
@@ -44,6 +44,10 @@
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 @@
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;
}
More information about the lvm-devel
mailing list