summaryrefslogtreecommitdiffstats
path: root/tools/pvcreate.c
diff options
context:
space:
mode:
authorHeinz Mauelshagen <heinzm@redhat.com>2002-02-15 01:26:16 +0000
committerHeinz Mauelshagen <heinzm@redhat.com>2002-02-15 01:26:16 +0000
commitf48d3bcbd03cb0bb75ce03300a0848aaad63bf3b (patch)
tree79fe74ae8974ed2033b7c0ba43be8e000189b628 /tools/pvcreate.c
parente56598a84d3fc06e8c5bb54ecd811e626f146885 (diff)
downloadlvm2-f48d3bcbd03cb0bb75ce03300a0848aaad63bf3b.tar.gz
lvm2-f48d3bcbd03cb0bb75ce03300a0848aaad63bf3b.tar.xz
lvm2-f48d3bcbd03cb0bb75ce03300a0848aaad63bf3b.zip
First cut on "pvcreate -s"
Diffstat (limited to 'tools/pvcreate.c')
-rw-r--r--tools/pvcreate.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/pvcreate.c b/tools/pvcreate.c
index 1d8c5d1e..c2287ad2 100644
--- a/tools/pvcreate.c
+++ b/tools/pvcreate.c
@@ -74,6 +74,7 @@ static void pvcreate_single(struct cmd_context *cmd, const char *pv_name)
struct physical_volume *pv;
struct id id, *idp = NULL;
char *uuid;
+ uint64_t size = 0;
struct device *dev;
if (arg_count(cmd, uuidstr_ARG)) {
@@ -91,7 +92,9 @@ static void pvcreate_single(struct cmd_context *cmd, const char *pv_name)
if (!pvcreate_check(cmd, pv_name))
return;
- if (!(pv = pv_create(cmd->fid, pv_name, idp))) {
+ size = arg_int_value(cmd, physicalvolumesize_ARG, 0) * 2;
+printf("%Ld\n", size);
+ if (!(pv = pv_create(cmd->fid, pv_name, idp, size))) {
log_err("Failed to setup physical volume \"%s\"", pv_name);
return;
}