1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

use seg_type macro

This commit is contained in:
Alasdair Kergon 2005-10-18 13:45:25 +00:00
parent 06820362bd
commit 0c5a80f6f0

View File

@ -112,8 +112,8 @@ static int _segments_compatible(struct lv_segment *first,
/* FIXME Relax this to first area type != second area type */ /* FIXME Relax this to first area type != second area type */
/* plus the additional AREA_LV checks needed */ /* plus the additional AREA_LV checks needed */
if ((first->areas[s].type != AREA_PV) || if ((seg_type(first, s) != AREA_PV) ||
(second->areas[s].type != AREA_PV)) (seg_type(second, s) != AREA_PV))
return 0; return 0;
width = first->area_len; width = first->area_len;
@ -142,7 +142,7 @@ static int _merge_segments(struct lv_segment *seg1, struct lv_segment *seg2)
seg1->area_len += seg2->area_len; seg1->area_len += seg2->area_len;
for (s = 0; s < seg1->area_count; s++) for (s = 0; s < seg1->area_count; s++)
if (seg1->areas[s].type == AREA_PV) if (seg_type(seg1, s) == AREA_PV)
merge_pv_segments(seg_pvseg(seg1, s), merge_pv_segments(seg_pvseg(seg1, s),
seg_pvseg(seg2, s)); seg_pvseg(seg2, s));