mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +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)) {
|
if (!validate_name(lp->lv_name)) {
|
||||||
log_error("Logical volume name \"%s\" has invalid "
|
log_error("Logical volume name \"%s\" is invalid",
|
||||||
"characters", lp->lv_name);
|
lp->lv_name);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -96,8 +96,7 @@ int lvrename(struct cmd_context *cmd, int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!validate_name(lv_name_new)) {
|
if (!validate_name(lv_name_new)) {
|
||||||
log_error
|
log_error("New logical volume name \"%s\" is invalid",
|
||||||
("New logical volume name \"%s\" has invalid characters",
|
|
||||||
lv_name_new);
|
lv_name_new);
|
||||||
return EINVALID_CMD_LINE;
|
return EINVALID_CMD_LINE;
|
||||||
}
|
}
|
||||||
|
@ -21,8 +21,7 @@ int vgcfgrestore(struct cmd_context *cmd, int argc, char **argv)
|
|||||||
vg_name += strlen(cmd->dev_dir);
|
vg_name += strlen(cmd->dev_dir);
|
||||||
|
|
||||||
if (!validate_name(vg_name)) {
|
if (!validate_name(vg_name)) {
|
||||||
log_error("Volume group name \"%s\" has invalid characters",
|
log_error("Volume group name \"%s\" is invalid", vg_name);
|
||||||
vg_name);
|
|
||||||
return ECMD_FAILED;
|
return ECMD_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,8 +74,7 @@ int vgcreate(struct cmd_context *cmd, int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!validate_name(vg_name)) {
|
if (!validate_name(vg_name)) {
|
||||||
log_error("New volume group name \"%s\" has invalid characters",
|
log_error("New volume group name \"%s\" is invalid", vg_name);
|
||||||
vg_name);
|
|
||||||
return ECMD_FAILED;
|
return ECMD_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ int vgrename(struct cmd_context *cmd, int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!validate_name(vg_name_new)) {
|
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);
|
vg_name_new);
|
||||||
return ECMD_FAILED;
|
return ECMD_FAILED;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user