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: Fri, 25 Jul 2008 14:45:00 -0000 [thread overview]
Message-ID: <20080725144526.31663.qmail@sourceware.org> (raw)
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: wysochanski@sourceware.org 2008-07-25 14:45:25
Modified files:
tools : pvcreate.c
Log message:
Refactor pvcreate - --yes argument
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/pvcreate.c.diff?cvsroot=lvm2&r1=1.71&r2=1.72
--- LVM2/tools/pvcreate.c 2008/07/25 14:36:55 1.71
+++ LVM2/tools/pvcreate.c 2008/07/25 14:45:24 1.72
@@ -29,6 +29,7 @@
uint32_t extent_size;
const char *restorefile; /* 0 if no --restorefile option */
force_t force;
+ unsigned yes;
};
const char _really_init[] =
@@ -72,7 +73,7 @@
}
/* prompt */
- if (pv && !is_orphan(pv) && !arg_count(cmd, yes_ARG) &&
+ if (pv && !is_orphan(pv) && !pp->yes &&
yes_no_prompt(_really_init, name, pv_vg_name(pv)) == 'n') {
log_print("%s: physical volume not initialized", name);
return 0;
@@ -114,9 +115,7 @@
/* Wipe superblock? */
if (dev_is_md(dev, &md_superblock) &&
- ((!pp->idp &&
- !pp->restorefile) ||
- arg_count(cmd, yes_ARG) ||
+ ((!pp->idp && !pp->restorefile) || pp->yes ||
(yes_no_prompt("Software RAID md superblock "
"detected on %s. Wipe it? [y/n] ", name) == 'y'))) {
log_print("Wiping software RAID md superblock on %s", name);
@@ -292,6 +291,7 @@
return 0;
}
+ pp->yes = arg_count(cmd, yes_ARG);
pp->force = arg_count(cmd, force_ARG);
if (arg_int_value(cmd, labelsector_ARG, 0) >= LABEL_SCAN_SECTORS) {
next reply other threads:[~2008-07-25 14:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-25 14:45 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:12 wysochanski
2008-07-23 19:29 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=20080725144526.31663.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).