1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-23 21:35:29 +03:00

Thin handle empty thin volume case

Report both values as 0 in case the volume is unused.
This commit is contained in:
Zdenek Kabelac 2012-01-19 15:22:32 +00:00
parent a1224b2da8
commit 4174dad301

View File

@ -3143,7 +3143,10 @@ int dm_get_status_thin(struct dm_pool *mem, const char *params,
return 0; return 0;
} }
if (sscanf(params, "%" PRIu64 " %" PRIu64, if (strchr(params, '-')) {
s->mapped_sectors = 0;
s->highest_mapped_sector = 0;
} else if (sscanf(params, "%" PRIu64 " %" PRIu64,
&s->mapped_sectors, &s->mapped_sectors,
&s->highest_mapped_sector) != 2) { &s->highest_mapped_sector) != 2) {
log_error("Failed to parse thin params: %s.", params); log_error("Failed to parse thin params: %s.", params);