mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
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.
This commit is contained in:
parent
7a4fdc1902
commit
8ac9791c36
@ -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;
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user