LVM2/daemons/clvmd lvm-functions.c
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.
daemons/clvmd/lvm-functions.c +6 -3
@@ -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; }
Quoted 1 line · zkabelac at sourceware.org
Remove printing of
LCK_CACHE
But straightforward to fix so it still gets printed (somewhere)?
Quoted 2 lines
If the
LCK_CLUSTERshould be printed here - lot of code need to be reworked - so adding FIXME comment.
With code like:
(lock_flags & LCK_CLUSTER_VG)LCK_CLUSTER_VG (I presume you meant) should it be handled by decode_flags?
Quoted 2 lines
+ * FIXME: 8bit value passed here -
+ * so onlyLCK_XXXdefines <0x100can be decoded
(Not really the thing to fix.)
Alasdair