[lvm-devel] master - dmstats: fix --length argument
Bryn Reeves
bmr at fedoraproject.org
Sat Aug 15 17:35:57 UTC 2015
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=4a6d5e2012cbcf40842b5ef051347694bbf5ca04
Commit: 4a6d5e2012cbcf40842b5ef051347694bbf5ca04
Parent: 9d5cd4ca14a94d83bf7b3c0b73896abc4ff8926c
Author: Bryn M. Reeves <bmr at redhat.com>
AuthorDate: Sat Aug 15 16:51:31 2015 +0100
Committer: Bryn M. Reeves <bmr at redhat.com>
CommitterDate: Sat Aug 15 18:35:10 2015 +0100
dmstats: fix --length argument
Commit f10ad95 introduced a regression causing the size of regions
passed in on the command line to be truncated to zero. Initialise
the 'this_len' variable to the supplied length to correct this.
---
tools/dmsetup.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/dmsetup.c b/tools/dmsetup.c
index ee1e1fe..097f1fd 100644
--- a/tools/dmsetup.c
+++ b/tools/dmsetup.c
@@ -4456,7 +4456,7 @@ static int _do_stats_create_regions(struct dm_stats *dms,
const char *program_id,
const char *aux_data)
{
- uint64_t this_start = 0, this_len = 0, region_id = UINT64_C(0);
+ uint64_t this_start = 0, this_len = len, region_id = UINT64_C(0);
char *target_type, *params; /* unused */
struct dm_task *dmt;
struct dm_info info;
More information about the lvm-devel
mailing list