ubi: Introduce vol_ignored()

This makes the logic more easy to follow.

Signed-off-by: Richard Weinberger <richard@nod.at>
This commit is contained in:
Richard Weinberger
2016-06-14 10:12:13 +02:00
parent d139d300a9
commit 243a4f8126
2 changed files with 33 additions and 6 deletions

View File

@@ -1105,4 +1105,19 @@ static inline int idx2vol_id(const struct ubi_device *ubi, int idx)
return idx;
}
/**
* ubi_is_fm_vol - check whether a volume ID is a Fastmap volume.
* @vol_id: volume ID
*/
static inline bool ubi_is_fm_vol(int vol_id)
{
switch (vol_id) {
case UBI_FM_SB_VOLUME_ID:
case UBI_FM_DATA_VOLUME_ID:
return true;
}
return false;
}
#endif /* !__UBI_UBI_H__ */