]> sourceware.org Git - lvm2.git/commitdiff
commands: accept --yes globally
authorAlasdair G Kergon <agk@redhat.com>
Tue, 14 May 2013 17:45:37 +0000 (18:45 +0100)
committerAlasdair G Kergon <agk@redhat.com>
Tue, 14 May 2013 17:45:37 +0000 (18:45 +0100)
Accept --yes on all commands, even ones that don't today have prompts,
so that test scripts that don't care about interactive prompts no
longer need to deal with them.

But continue to mention --yes only in the command prototypes that
actually use it.

WHATS_NEW
man/lvm.8.in
tools/commands.h
tools/lvmcmdline.c

index 513210cbb3117a38c186cf3efbe3fcf7298d8249..626a354244d584f402c7276555659b18a7c234b7 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
 Version 2.02.99 - 
 ===================================
+  Accept --yes in all commands so test scripts can be simpler.
   Fix alignment of PV data area if detected alignment less than 1 MB (2.02.74).
   Fix memory resource leak in memlocking error path.
   Fix premature DM version checking which caused useless mapper/control access.
index d15e86bac839ef2344818d16b94bf39c944d0e26..37a60e4a85dc201af3cdb0eeb3ecfe4b844c1eb5 100644 (file)
@@ -171,6 +171,10 @@ Overrides config file setting.
 Suppress output and log messages.
 Overrides \fB\-d\fP and \fB\-v\fP.
 .TP
+.BR \-\-yes
+Don't prompt for confirmation interactively but instead always assume the
+answer is 'yes'.  Take great care if you use this!
+.TP
 .BR \-t ", " \-\-test
 Run in test mode. Commands will not update metadata.
 This is implemented by disabling all metadata writing but nevertheless
index ace077f4b33db108a32d526a182dc34530998918..895024301b1134914d54d5bba2864c9729c96e18 100644 (file)
@@ -94,10 +94,10 @@ xx(lvchange,
    "\t[--sysinit]\n"
    "\t[-t|--test]\n"
    "\t[-v|--verbose]\n"
-   "\t[-y|--yes]\n"
    "\t[--version]\n"
    "\t[--writebehind BehindCount\n"
    "\t[--writemostly PhysicalVolume]\n"
+   "\t[-y|--yes]\n"
    "\t[-Z|--zero {y|n}]\n"
    "\tLogicalVolume[Path] [LogicalVolume[Path]...]\n",
 
@@ -106,7 +106,7 @@ xx(lvchange,
    major_ARG, minor_ARG, monitor_ARG, noudevsync_ARG, partial_ARG,
    permission_ARG, persistent_ARG, poll_ARG, readahead_ARG, resync_ARG,
    refresh_ARG, addtag_ARG, deltag_ARG, syncaction_ARG, sysinit_ARG, test_ARG,
-   yes_ARG, writebehind_ARG, writemostly_ARG, zero_ARG)
+   writebehind_ARG, writemostly_ARG, zero_ARG)
 
 xx(lvconvert,
    "Change logical volume layout",
@@ -174,7 +174,7 @@ xx(lvconvert,
    trackchanges_ARG, type_ARG, stripes_long_ARG, stripesize_ARG, test_ARG,
    chunksize_ARG, discards_ARG, poolmetadata_ARG, poolmetadatasize_ARG,
    originname_ARG, thin_ARG, thinpool_ARG,
-   use_policies_ARG, yes_ARG, force_ARG, zero_ARG)
+   use_policies_ARG, force_ARG, zero_ARG)
 
 xx(lvcreate,
    "Create a logical volume",
@@ -380,12 +380,12 @@ xx(lvreduce,
    "\t[-r|--resizefs]\n"
    "\t[-t|--test]\n"
    "\t[-v|--verbose]\n"
-   "\t[-y|--yes]\n"
    "\t[--version]" "\n"
+   "\t[-y|--yes]\n"
    "\tLogicalVolume[Path]\n",
 
    autobackup_ARG, force_ARG,  extents_ARG, nofsck_ARG, noudevsync_ARG,
-   resizefs_ARG, size_ARG, test_ARG, yes_ARG)
+   resizefs_ARG, size_ARG, test_ARG)
 
 xx(lvremove,
    "Remove logical volume(s) from the system",
@@ -568,7 +568,7 @@ xx(pvcreate,
    force_ARG, test_ARG, labelsector_ARG, metadatatype_ARG,
    metadatacopies_ARG, metadatasize_ARG, metadataignore_ARG,
    norestorefile_ARG, physicalvolumesize_ARG, pvmetadatacopies_ARG,
-   restorefile_ARG, uuidstr_ARG, yes_ARG, zero_ARG)
+   restorefile_ARG, uuidstr_ARG, zero_ARG)
 
 xx(pvdata,
    "Display the on-disk metadata for physical volume(s)",
@@ -658,11 +658,11 @@ xx(pvremove,
    "\t[-h|-?|--help] " "\n"
    "\t[-t|--test] " "\n"
    "\t[-v|--verbose] " "\n"
-   "\t[-y|--yes]" "\n"
    "\t[--version] " "\n"
+   "\t[-y|--yes]" "\n"
    "\tPhysicalVolume [PhysicalVolume...]\n",
 
-   force_ARG, test_ARG, yes_ARG)
+   force_ARG, test_ARG)
 
 xx(pvs,
    "Display information about physical volumes",
@@ -838,12 +838,13 @@ xx(vgcreate,
    "\t[-t|--test] " "\n"
    "\t[-v|--verbose]" "\n"
    "\t[--version] " "\n"
+   "\t[-y|--yes]" "\n"
    "\t[ PHYSICAL DEVICE OPTIONS ] " "\n"
    "\tVolumeGroupName PhysicalDevicePath [PhysicalDevicePath...]\n",
 
    addtag_ARG, alloc_ARG, autobackup_ARG, clustered_ARG, maxlogicalvolumes_ARG,
    maxphysicalvolumes_ARG, metadatatype_ARG, physicalextentsize_ARG, test_ARG,
-   force_ARG, yes_ARG, zero_ARG, labelsector_ARG, metadatasize_ARG,
+   force_ARG, zero_ARG, labelsector_ARG, metadatasize_ARG,
    pvmetadatacopies_ARG, metadatacopies_ARG, vgmetadatacopies_ARG,
    dataalignment_ARG, dataalignmentoffset_ARG)
 
@@ -908,11 +909,12 @@ xx(vgextend,
    "\t[-t|--test]\n"
    "\t[-v|--verbose]\n"
    "\t[--version]" "\n"
+   "\t[-y|--yes]\n"
    "\t[ PHYSICAL DEVICE OPTIONS ] " "\n"
    "\tVolumeGroupName PhysicalDevicePath [PhysicalDevicePath...]\n",
 
    autobackup_ARG, test_ARG,
-   force_ARG, yes_ARG, zero_ARG, labelsector_ARG, metadatatype_ARG,
+   force_ARG, zero_ARG, labelsector_ARG, metadatatype_ARG,
    metadatasize_ARG, pvmetadatacopies_ARG, metadatacopies_ARG,
    metadataignore_ARG, dataalignment_ARG, dataalignmentoffset_ARG,
    restoremissing_ARG)
index c03e9ef3b7e2fe45e855a807fe07035c5279c902..0b64ed839a8d5aa94d5996e034e59b7e0e30bec0 100644 (file)
@@ -615,6 +615,7 @@ void lvm_register_commands(void)
                                            driverloaded_ARG, \
                                            debug_ARG, help_ARG, help2_ARG, \
                                            version_ARG, verbose_ARG, \
+                                           yes_ARG, \
                                            quiet_ARG, config_ARG, -1);
 #include "commands.h"
 #undef xx
This page took 0.050018 seconds and 5 git commands to generate.