All of lore.kernel.org
 help / color / mirror / Atom feed
* master - RAID: s/int/uint32_t for dev_count in dm_status_raid struct
@ 2013-06-17 18:13 Jonathan Brassow
  0 siblings, 0 replies; only message in thread
From: Jonathan Brassow @ 2013-06-17 18:13 UTC (permalink / raw)
  To: lvm-devel

Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=8ac9791c362dd150abb80749fbb72c4a336fc61b
Commit:        8ac9791c362dd150abb80749fbb72c4a336fc61b
Parent:        7a4fdc19022e578c6003b6bdbd9e5edfa753a827
Author:        Jonathan Brassow <jbrassow@redhat.com>
AuthorDate:    Mon Jun 17 12:58:38 2013 -0500
Committer:     Jonathan Brassow <jbrassow@redhat.com>
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(-)

diff --git a/libdm/libdevmapper.h b/libdm/libdevmapper.h
index bada775..0434506 100644
--- a/libdm/libdevmapper.h
+++ b/libdm/libdevmapper.h
@@ -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;
diff --git a/libdm/libdm-deptree.c b/libdm/libdm-deptree.c
index 50ed908..ba415b2 100644
--- a/libdm/libdm-deptree.c
+++ b/libdm/libdm-deptree.c
@@ -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,



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-06-17 18:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-17 18:13 master - RAID: s/int/uint32_t for dev_count in dm_status_raid struct Jonathan Brassow

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.