Two patches follow that should not change LVM2 functional behavior. They add some additional functions and minor cleanups to facilitate later patches that will read old LVM2 metadata, providing some of the guts for 'pvck'.