diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2008-09-02 17:41:47 +0300 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2008-09-02 17:41:47 +0300 |
commit | c0d59ef392816ff9c0bd861d1cdb863a09fd6b1c (patch) | |
tree | d3eb46ea10303bd742228cc53b555d2a4a52b2e8 | |
parent | 214ddd398850d003dcd1943da6a039f324646b5b (diff) |
ubi-utils: minor rename
We use term "volume ID", not "volume number". So change few
vol_num variables to vol_id to be consistent.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
-rw-r--r-- | ubi-utils/new-utils/include/libubi.h | 10 | ||||
-rw-r--r-- | ubi-utils/new-utils/src/libubi.c | 14 | ||||
-rw-r--r-- | ubi-utils/new-utils/src/ubinfo.c | 8 |
3 files changed, 16 insertions, 16 deletions
diff --git a/ubi-utils/new-utils/include/libubi.h b/ubi-utils/new-utils/include/libubi.h index 0f5c9c8..3010ed4 100644 --- a/ubi-utils/new-utils/include/libubi.h +++ b/ubi-utils/new-utils/include/libubi.h @@ -94,8 +94,8 @@ struct ubi_info /** * struct ubi_dev_info - UBI device information. * @vol_count: count of volumes on this UBI device - * @lowest_vol_num: lowest volume number - * @highest_vol_num: highest volume number + * @lowest_vol_id: lowest volume ID + * @highest_vol_id: highest volume ID * @major: major number of corresponding character device * @minor: minor number of corresponding character device * @total_lebs: total number of logical eraseblocks on this UBI device @@ -115,8 +115,8 @@ struct ubi_dev_info { int dev_num; int vol_count; - int lowest_vol_num; - int highest_vol_num; + int lowest_vol_id; + int highest_vol_id; int major; int minor; int total_lebs; @@ -331,7 +331,7 @@ int ubi_get_vol_info(libubi_t desc, const char *node, * @info: pointer to the &struct ubi_vol_info object to fill * * This function is identical to 'ubi_get_vol_info()' except that it accepts UBI - * volume number, not UBI volume character device. + * volume ID, not UBI volume character device. */ int ubi_get_vol_info1(libubi_t desc, int dev_num, int vol_id, struct ubi_vol_info *info); diff --git a/ubi-utils/new-utils/src/libubi.c b/ubi-utils/new-utils/src/libubi.c index 10e3f2a..0fca822 100644 --- a/ubi-utils/new-utils/src/libubi.c +++ b/ubi-utils/new-utils/src/libubi.c @@ -999,7 +999,7 @@ int ubi_get_dev_info1(libubi_t desc, int dev_num, struct ubi_dev_info *info) if (!sysfs_ubi) return -1; - info->lowest_vol_num = INT_MAX; + info->lowest_vol_id = INT_MAX; while (1) { int vol_id, ret, devno; @@ -1019,10 +1019,10 @@ int ubi_get_dev_info1(libubi_t desc, int dev_num, struct ubi_dev_info *info) ret = sscanf(dirent->d_name, UBI_VOL_NAME_PATT"%s", &devno, &vol_id, tmp_buf); if (ret == 2 && devno == dev_num) { info->vol_count += 1; - if (vol_id > info->highest_vol_num) - info->highest_vol_num = vol_id; - if (vol_id < info->lowest_vol_num) - info->lowest_vol_num = vol_id; + if (vol_id > info->highest_vol_id) + info->highest_vol_id = vol_id; + if (vol_id < info->lowest_vol_id) + info->lowest_vol_id = vol_id; } } @@ -1034,8 +1034,8 @@ int ubi_get_dev_info1(libubi_t desc, int dev_num, struct ubi_dev_info *info) if (closedir(sysfs_ubi)) return sys_errmsg("closedir failed on \"%s\"", lib->sysfs_ubi); - if (info->lowest_vol_num == INT_MAX) - info->lowest_vol_num = 0; + if (info->lowest_vol_id == INT_MAX) + info->lowest_vol_id = 0; if (dev_get_major(lib, dev_num, &info->major, &info->minor)) return -1; diff --git a/ubi-utils/new-utils/src/ubinfo.c b/ubi-utils/new-utils/src/ubinfo.c index aada8e7..536ec01 100644 --- a/ubi-utils/new-utils/src/ubinfo.c +++ b/ubi-utils/new-utils/src/ubinfo.c @@ -240,8 +240,8 @@ static int print_dev_info(libubi_t libubi, int dev_num, int all) return 0; printf("Present volumes: "); - for (i = dev_info.lowest_vol_num; - i <= dev_info.highest_vol_num; i++) { + for (i = dev_info.lowest_vol_id; + i <= dev_info.highest_vol_id; i++) { err = ubi_get_vol_info1(libubi, dev_info.dev_num, i, &vol_info); if (err == -1) { if (errno == ENOENT) @@ -266,8 +266,8 @@ static int print_dev_info(libubi_t libubi, int dev_num, int all) first = 1; printf("\n"); - for (i = dev_info.lowest_vol_num; - i <= dev_info.highest_vol_num; i++) { + for (i = dev_info.lowest_vol_id; + i <= dev_info.highest_vol_id; i++) { if(!first) printf("-----------------------------------\n"); err = ubi_get_vol_info1(libubi, dev_info.dev_num, i, &vol_info); |