diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2007-12-23 18:32:09 +0200 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2007-12-23 18:32:09 +0200 |
commit | db697836173e90d95390649287648cdd420e1b43 (patch) | |
tree | 63454baa7bab644ed72a93741f5cc8f845d86843 /tests/ubi-tests/common.c | |
parent | 233824d00b526d82dd2ef05d6dad4dbc5b4cc943 (diff) |
ubi-tests: update to recent libubi changes
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'tests/ubi-tests/common.c')
-rw-r--r-- | tests/ubi-tests/common.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/ubi-tests/common.c b/tests/ubi-tests/common.c index cb63e77..1343ec1 100644 --- a/tests/ubi-tests/common.c +++ b/tests/ubi-tests/common.c @@ -68,11 +68,11 @@ int __initial_check(const char *test, int argc, char * const argv[]) goto close; } - if (dev_info.avail_ebs < MIN_AVAIL_EBS) { + if (dev_info.avail_lebs < MIN_AVAIL_EBS) { __err_msg(test, __FUNCTION__, __LINE__, "insufficient available eraseblocks %d on UBI " "device, required %d", - dev_info.avail_ebs, MIN_AVAIL_EBS); + dev_info.avail_lebs, MIN_AVAIL_EBS); goto close; } @@ -146,7 +146,7 @@ int __check_volume(libubi_t libubi, struct ubi_dev_info *dev_info, { int ret; struct ubi_vol_info vol_info; - int eb_size; + int leb_size; long long rsvd_bytes; ret = ubi_get_vol_info1(libubi, dev_info->dev_num, vol_id, &vol_info); @@ -178,17 +178,17 @@ int __check_volume(libubi_t libubi, struct ubi_dev_info *dev_info, return -1; } - eb_size = dev_info->eb_size - (dev_info->eb_size % req->alignment); - if (eb_size != vol_info.eb_size) { + leb_size = dev_info->leb_size - (dev_info->leb_size % req->alignment); + if (leb_size != vol_info.leb_size) { __err_msg(test, func, line, "bad usable LEB size %d, should be %d", - vol_info.eb_size, eb_size); + vol_info.leb_size, leb_size); return -1; } rsvd_bytes = req->bytes; - if (rsvd_bytes % eb_size) - rsvd_bytes += eb_size - (rsvd_bytes % eb_size); + if (rsvd_bytes % leb_size) + rsvd_bytes += leb_size - (rsvd_bytes % leb_size); if (rsvd_bytes != vol_info.rsvd_bytes) { __err_msg(test, func, line, |