1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

Ban vgcreate -s 0

This commit is contained in:
Alasdair Kergon 2003-11-06 17:07:19 +00:00
parent 8fd6f4b6fb
commit 2de96f501a

View File

@ -68,6 +68,11 @@ int vgcreate(struct cmd_context *cmd, int argc, char **argv)
return EINVALID_CMD_LINE; return EINVALID_CMD_LINE;
} }
if (!extent_size) {
log_error("Physical extent size may not be zero");
return EINVALID_CMD_LINE;
}
/* Strip dev_dir if present */ /* Strip dev_dir if present */
if (!strncmp(vg_name, cmd->dev_dir, strlen(cmd->dev_dir))) if (!strncmp(vg_name, cmd->dev_dir, strlen(cmd->dev_dir)))
vg_name += strlen(cmd->dev_dir); vg_name += strlen(cmd->dev_dir);