]> 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)
commit483a7cb6d56bbe0ec5d123d9764a3fc0b42d7382
tree4d8180126b3d3a4b888ac9f1e7edf5a503b7acd6
parent8c38c9642c3bbcf179014a58bbb8c245a700e46a
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.032646 seconds and 5 git commands to generate.