char *lv_name_old, *lv_name_new;
const char *vg_name, *vg_name_new, *vg_name_old;
char *st;
- int ret = ECMD_FAILED;
+ int ret;
if (argc == 3) {
vg_name = skip_dev_dir(cmd, argv[0], NULL);
_lvrename_single);
destroy_processing_handle(cmd, handle);
- return ret;
+ return ret;
}
{
struct processing_handle *handle;
struct lvresize_params lp = { 0 };
- int ret = ECMD_FAILED;
+ int ret;
- if (!_lvresize_params(cmd, argc, argv, &lp))
+ if (!_lvresize_params(cmd, argc, argv, &lp)) {
+ stack;
return EINVALID_CMD_LINE;
+ }
if (!(handle = init_processing_handle(cmd))) {
log_error("Failed to initialize processing handle.");
struct volume_group *vg, struct processing_handle *handle)
{
struct vgrename_params *vp = (struct vgrename_params *) handle->custom_handle;
- struct lvmcache_vginfo *vginfo;
char old_path[NAME_LEN];
char new_path[NAME_LEN];
struct id id;
*/
lvmcache_seed_infos_from_lvmetad(cmd);
- if ((vginfo = lvmcache_vginfo_from_vgname(vp->vg_name_new, NULL))) {
+ if (lvmcache_vginfo_from_vgname(vp->vg_name_new, NULL)) {
log_error("New VG name \"%s\" already exists", vp->vg_name_new);
return ECMD_FAILED;
}