1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00

Check for correctness of uint64 value if exists

This commit is contained in:
Zdenek Kabelac 2012-01-25 21:43:51 +00:00
parent e152c0b9e6
commit 5d1d269f45
2 changed files with 6 additions and 1 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.89 -
==================================
Check for correctness of uint64 dev_size value.
Rename origin_only parameter to more generic flag use_layer for lv_info().
Thin pools have segment fields thin_count, zero, transaction_id.
Each new created LV volume has creation lv_time and lv_host.

View File

@ -216,7 +216,11 @@ static int _read_pv(struct format_instance *fid,
pv->status |= MISSING_PV;
/* Late addition */
_read_uint64(pvn, "dev_size", &pv->size);
if (dm_config_has_node(pvn, "dev_size") &&
!_read_uint64(pvn, "dev_size", &pv->size)) {
log_error("Couldn't read dev size for physical volume.");
return 0;
}
if (!_read_uint64(pvn, "pe_start", &pv->pe_start)) {
log_error("Couldn't read extent size for physical volume.");