]> sourceware.org Git - lvm2.git/commit
Refactor a few report field calculations into separate functions.
authorDave Wysochanski <dwysocha@redhat.com>
Sun, 26 Jul 2009 12:41:09 +0000 (12:41 +0000)
committerDave Wysochanski <dwysocha@redhat.com>
Sun, 26 Jul 2009 12:41:09 +0000 (12:41 +0000)
commit5d4fd6055e6e7bc9070918025c149a883b54fe2d
tree4d8180126b3d3a4b888ac9f1e7edf5a503b7acd6
parent83f4e5b45754eeeeaf5e880901df153a4f79acf4
Refactor a few report field calculations into separate functions.

For liblvm 'get' functions, we should share code with the reporting functions.
This means we need common code to return the values for the fields.
In this patch we refactor a few of the fields needed in liblvm.
Unfortunately, for the simple fields that do derefernces of structure
members (for example, vg_extent_count), we cannot call the common function
from the reporting infrastructure without more refactoring.  The reason is
that the dereference of the simple fields is done deep inside the reporting
code (to get the generic "data" pointer), and the display function is a
generic 'size32' function.  We can fix these issues later with more
refactoring.

Should be no functional change and the testsuite should cover any possible
regressions.  The only fields in the report affected by this patch are:
vg_size, vg_free, and pv_mda_count.

Author: Dave Wysochanski <dwysocha@redhat.com>
lib/metadata/metadata-exported.h
lib/metadata/metadata.c
lib/report/report.c
This page took 0.027884 seconds and 5 git commands to generate.