public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
From: wysochanski@sourceware.org
To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org
Subject: LVM2/tools pvcreate.c
Date: Wed, 23 Jul 2008 19:29:00 -0000	[thread overview]
Message-ID: <20080723192959.8157.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	wysochanski@sourceware.org	2008-07-23 19:29:59

Modified files:
	tools          : pvcreate.c 

Log message:
	Refactor pvcreate - move labelsector parameter parsing & validation.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/pvcreate.c.diff?cvsroot=lvm2&r1=1.65&r2=1.66

--- LVM2/tools/pvcreate.c	2008/07/21 19:27:22	1.65
+++ LVM2/tools/pvcreate.c	2008/07/23 19:29:58	1.66
@@ -21,6 +21,7 @@
 	uint64_t size;
 	int pvmetadatacopies;
 	uint64_t pvmetadatasize;
+	int64_t labelsector;
 };
 
 const char _really_init[] =
@@ -237,8 +238,7 @@
 	log_very_verbose("Writing physical volume data to disk \"%s\"",
 			 pv_name);
 	if (!(pv_write(cmd, (struct physical_volume *)pv, &mdas,
-		       arg_int64_value(cmd, labelsector_ARG,
-						       DEFAULT_LABELSECTOR)))) {
+		       pp->labelsector))) {
 		log_error("Failed to write physical volume \"%s\"", pv_name);
 		goto error;
 	}
@@ -290,6 +290,9 @@
 		log_error("labelsector must be less than %lu",
 			  LABEL_SCAN_SECTORS);
 		return 0;
+	} else {
+		pp->labelsector = arg_int64_value(cmd, labelsector_ARG,
+						  DEFAULT_LABELSECTOR);
 	}
 
 	if (!(cmd->fmt->features & FMT_MDAS) &&


             reply	other threads:[~2008-07-23 19:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-23 19:29 wysochanski [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-03-16 15:48 agk
2009-03-17 14:01 mornfall
2008-07-25 14:45 wysochanski
2008-07-25 14:12 wysochanski
2008-07-21 19:27 wysochanski
2004-11-19 19:32 agk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080723192959.8157.qmail@sourceware.org \
    --to=wysochanski@sourceware.org \
    --cc=lvm-devel@redhat.com \
    --cc=lvm2-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).