mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +03:00
Thin handle empty thin volume case
Report both values as 0 in case the volume is unused.
This commit is contained in:
parent
a1224b2da8
commit
4174dad301
@ -3143,7 +3143,10 @@ int dm_get_status_thin(struct dm_pool *mem, const char *params,
|
||||
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->highest_mapped_sector) != 2) {
|
||||
log_error("Failed to parse thin params: %s.", params);
|
||||
|
Loading…
Reference in New Issue
Block a user