summaryrefslogtreecommitdiffstats
path: root/libdm/libdm-report.c
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2010-02-15 18:36:48 +0000
committerZdenek Kabelac <zkabelac@redhat.com>2010-02-15 18:36:48 +0000
commitd98d8559189c6bae6d6a013f7660c352078cc9db (patch)
treed9da91966605a1619e51c5fa72e1c3c9641c168a /libdm/libdm-report.c
parent810349313ad320cd7df51a4d4579a4d5eb17927d (diff)
downloadlvm2-d98d8559189c6bae6d6a013f7660c352078cc9db.tar.gz
lvm2-d98d8559189c6bae6d6a013f7660c352078cc9db.tar.xz
lvm2-d98d8559189c6bae6d6a013f7660c352078cc9db.zip
Fix dm_report_field_uint64 to really use 64bit.
(function is currently not in use)
Diffstat (limited to 'libdm/libdm-report.c')
-rw-r--r--libdm/libdm-report.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libdm/libdm-report.c b/libdm/libdm-report.c
index aead8641..e13115a7 100644
--- a/libdm/libdm-report.c
+++ b/libdm/libdm-report.c
@@ -207,7 +207,7 @@ int dm_report_field_int32(struct dm_report *rh,
int dm_report_field_uint64(struct dm_report *rh,
struct dm_report_field *field, const uint64_t *data)
{
- const int value = *data;
+ const uint64_t value = *data;
uint64_t *sortval;
char *repstr;
@@ -221,12 +221,12 @@ int dm_report_field_uint64(struct dm_report *rh,
return 0;
}
- if (dm_snprintf(repstr, 21, "%d", value) < 0) {
- log_error("dm_report_field_uint64: uint64 too big: %d", value);
+ if (dm_snprintf(repstr, 21, "%" PRIu64 , value) < 0) {
+ log_error("dm_report_field_uint64: uint64 too big: %" PRIu64, value);
return 0;
}
- *sortval = (const uint64_t) value;
+ *sortval = value;
field->sort_value = sortval;
field->report_string = repstr;