master - RAID: s/int/uint32_t for dev_count in dm_status_raid struct
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=8ac9791c362dd150abb80749fbb72c4a336fc61b Commit: 8ac9791c362dd150abb80749fbb72c4a336fc61b Parent: 7a4fdc19022e578c6003b6bdbd9e5edfa753a827 Author: Jonathan Brassow <[email protected]> AuthorDate: Mon Jun 17 12:58:38 2013 -0500 Committer: Jonathan Brassow <[email protected]> CommitterDate: Mon Jun 17 12:58:38 2013 -0500
RAID: s/int/uint32_t for dev_count in dm_status_raid struct
Device count is never negative. Change 'dev_count' to be uint32_t instead of int.
--- libdm/libdevmapper.h | 2 +- libdm/libdm-deptree.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
libdm/libdevmapper.h +1 -1
@@ -281,7 +281,7 @@ struct dm_status_raid {uint64_t total_regions;uint64_t insync_regions;uint64_t mismatch_count; -int dev_count; +uint32_t dev_count;char *raid_type;char *dev_health;char *sync_action;
libdm/libdm-deptree.c +1 -1
@@ -2978,7 +2978,7 @@ int dm_get_status_raid(struct dm_pool *mem, const char *params,if (!(s->dev_health =dm_pool_zalloc (mem, i +1 ))) goto_bad; - if (sscanf(params, "%s %d %s %" PRIu64 "/%" PRIu64, + if (sscanf(params, "%s %u %s %" PRIu64 "/%" PRIu64, s->raid_type, &s->dev_count, s->dev_health,