Version 2.02.27 -
================================
+ Don't use index and rindex functions marked by SUSv3 as legacy.
Fix vgsplit if splitting all PVs from VG.
Fix lvmdiskscan volume reporting when run in the lvm shell
Fix missing lvm_shell symbol in lvm2cmd library. (2.02.23)
else
continue;
}
- if (!index(str, '/')) {
+ if (!strchr(str, '/')) {
/* vgname supplied */
if (!strcmp(str, lv->vg->name))
return 1;
log_debug("Getting device info for %s", dl->name);
/* Rename? */
- if ((suffix = rindex(dl->dlid + sizeof(UUID_PREFIX) - 1, '-')))
+ if ((suffix = strrchr(dl->dlid + sizeof(UUID_PREFIX) - 1, '-')))
suffix++;
newname = build_dm_name(dm->mem, dm->vg_name, dl->lv->name,
suffix);
if (strcmp(".vg", dot))
return 0;
- if (!(underscore = rindex(filename, '_')))
+ if (!(underscore = strrchr(filename, '_')))
return 0;
if (sscanf(underscore + 1, "%u", ix) != 1)
char *slash;
char temp_file[PATH_MAX], temp_dir[PATH_MAX];
- slash = rindex(tc->path_edit, '/');
+ slash = strrchr(tc->path_edit, '/');
if (slash == 0)
strcpy(temp_dir, ".");
return 0;
/* vgrename? */
- if ((slash = rindex(tc->path_live, '/')))
+ if ((slash = strrchr(tc->path_live, '/')))
slash = slash + 1;
else
slash = tc->path_live;
float percent2;
uint64_t numerator, denominator;
- if (index(params, '/')) {
+ if (strchr(params, '/')) {
if (sscanf(params, "%" PRIu64 "/%" PRIu64,
&numerator, &denominator) == 2) {
*total_numerator += numerator;