From 2de96f501ab6e26f344b86737c89af8723cef980 Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Thu, 6 Nov 2003 17:07:19 +0000 Subject: [PATCH] Ban vgcreate -s 0 --- tools/vgcreate.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/vgcreate.c b/tools/vgcreate.c index 25615dd95..bba795fc5 100644 --- a/tools/vgcreate.c +++ b/tools/vgcreate.c @@ -68,6 +68,11 @@ int vgcreate(struct cmd_context *cmd, int argc, char **argv) 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 */ if (!strncmp(vg_name, cmd->dev_dir, strlen(cmd->dev_dir))) vg_name += strlen(cmd->dev_dir);