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/rmvol.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/rmvol.c')
-rw-r--r-- | tests/ubi-tests/rmvol.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/ubi-tests/rmvol.c b/tests/ubi-tests/rmvol.c index fb9b344..6c52319 100644 --- a/tests/ubi-tests/rmvol.c +++ b/tests/ubi-tests/rmvol.c @@ -33,7 +33,7 @@ #define TESTNAME "rmvol" #include "common.h" -#define SYSFS_FILE "/sys/class/ubi/ubi%d_%d/usable_eb_size" +#define SYSFS_FILE "/sys/class/ubi/ubi%d_%d/usable_leb_size" int main(int argc, char * const argv[]) { @@ -64,7 +64,7 @@ int main(int argc, char * const argv[]) /* Create a small dynamic volume */ req.vol_id = UBI_VOL_NUM_AUTO; req.alignment = dev_info.min_io_size; - req.bytes = dev_info.eb_size; + req.bytes = dev_info.leb_size; req.vol_type = UBI_DYNAMIC_VOLUME; req.name = "rmvol"; @@ -134,7 +134,7 @@ static int mkvol_alignment(void) struct ubi_mkvol_request req; int i, vol_id, ebsz; const char *name = TESTNAME ":mkvol_alignment()"; - int alignments[] = ALIGNMENTS(dev_info.eb_size); + int alignments[] = ALIGNMENTS(dev_info.leb_size); for (i = 0; i < sizeof(alignments)/sizeof(int); i++) { req.vol_id = UBI_VOL_NUM_AUTO; @@ -146,8 +146,8 @@ static int mkvol_alignment(void) req.alignment = dev_info.min_io_size; /* Bear in mind alignment reduces EB size */ - ebsz = dev_info.eb_size - dev_info.eb_size % req.alignment; - req.bytes = dev_info.avail_ebs * ebsz; + ebsz = dev_info.leb_size - dev_info.leb_size % req.alignment; + req.bytes = dev_info.avail_lebs * ebsz; req.vol_type = UBI_DYNAMIC_VOLUME; req.name = name; |