mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Generalise 'invalid chars' error mesg to just say 'invalid'
This commit is contained in:
parent
364a71ca82
commit
8387b47352
@ -119,8 +119,8 @@ static int _read_name_params(struct lvcreate_params *lp,
|
||||
}
|
||||
|
||||
if (!validate_name(lp->lv_name)) {
|
||||
log_error("Logical volume name \"%s\" has invalid "
|
||||
"characters", lp->lv_name);
|
||||
log_error("Logical volume name \"%s\" is invalid",
|
||||
lp->lv_name);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -96,8 +96,7 @@ int lvrename(struct cmd_context *cmd, int argc, char **argv)
|
||||
}
|
||||
|
||||
if (!validate_name(lv_name_new)) {
|
||||
log_error
|
||||
("New logical volume name \"%s\" has invalid characters",
|
||||
log_error("New logical volume name \"%s\" is invalid",
|
||||
lv_name_new);
|
||||
return EINVALID_CMD_LINE;
|
||||
}
|
||||
|
@ -21,8 +21,7 @@ int vgcfgrestore(struct cmd_context *cmd, int argc, char **argv)
|
||||
vg_name += strlen(cmd->dev_dir);
|
||||
|
||||
if (!validate_name(vg_name)) {
|
||||
log_error("Volume group name \"%s\" has invalid characters",
|
||||
vg_name);
|
||||
log_error("Volume group name \"%s\" is invalid", vg_name);
|
||||
return ECMD_FAILED;
|
||||
}
|
||||
|
||||
|
@ -74,8 +74,7 @@ int vgcreate(struct cmd_context *cmd, int argc, char **argv)
|
||||
}
|
||||
|
||||
if (!validate_name(vg_name)) {
|
||||
log_error("New volume group name \"%s\" has invalid characters",
|
||||
vg_name);
|
||||
log_error("New volume group name \"%s\" is invalid", vg_name);
|
||||
return ECMD_FAILED;
|
||||
}
|
||||
|
||||
|
@ -57,7 +57,7 @@ int vgrename(struct cmd_context *cmd, int argc, char **argv)
|
||||
}
|
||||
|
||||
if (!validate_name(vg_name_new)) {
|
||||
log_error("New volume group name \"%s\" has invalid characters",
|
||||
log_error("New volume group name \"%s\" is invalid",
|
||||
vg_name_new);
|
||||
return ECMD_FAILED;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user