Command line interfaces should use dash, not underscore, as many
keyboard layouts allow that to be typed with fewer shift key presses.
Also, the US spelling of --tunneled gets more google hits than the
UK spelling of --tunnelled.
* tools/virsh.c (opts_migrate): Allow US variant.
(opts_blkdeviotune): Prefer - over _.
* tools/virsh.pod (blkdeviotune): Fix spelling.
---
tools/virsh.c | 49 +++--
tools/virsh.pod | 18 +-
2 files changed, 40 insertions(+), 27 deletions(-)
diff --git a/tools/virsh.c b/tools/virsh.c
index 77cf4ac..75a1a3b 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -6879,6 +6879,7 @@ static const vshCmdOptDef opts_migrate[] = {
{live, VSH_OT_BOOL, 0, N_(live migration)},
{p2p, VSH_OT_BOOL, 0, N_(peer-2-peer migration)},
{direct, VSH_OT_BOOL, 0, N_(direct migration)},
+{tunneled, VSH_OT_ALIAS, 0, tunnelled},
{tunnelled, VSH_OT_BOOL, 0, N_(tunnelled migration)},
{persistent, VSH_OT_BOOL, 0, N_(persist VM on destination)},
{undefinesource, VSH_OT_BOOL, 0, N_(undefine VM on source)},
@@ -7574,17 +7575,23 @@ static const vshCmdInfo info_blkdeviotune[] = {
static const vshCmdOptDef opts_blkdeviotune[] = {
{domain, VSH_OT_DATA, VSH_OFLAG_REQ, N_(domain name, id or uuid)},
{device, VSH_OT_DATA, VSH_OFLAG_REQ, N_(block device)},
-{total_bytes_sec, VSH_OT_INT, VSH_OFLAG_NONE,
+{total_bytes_sec, VSH_OT_ALIAS, 0, total-bytes-sec},
+{total-bytes-sec, VSH_OT_INT, VSH_OFLAG_NONE,
N_(total throughput limit in bytes per second)},
-{read_bytes_sec, VSH_OT_INT, VSH_OFLAG_NONE,
+{read_bytes_sec, VSH_OT_ALIAS, 0, read-bytes-sec},
+{read-bytes-sec, VSH_OT_INT, VSH_OFLAG_NONE,
N_(read throughput limit in bytes per second)},
-{write_bytes_sec, VSH_OT_INT, VSH_OFLAG_NONE,
+{write_bytes_sec, VSH_OT_ALIAS, 0, write-bytes-sec},
+{write-bytes-sec, VSH_OT_INT, VSH_OFLAG_NONE,
N_(write throughput limit in bytes per second)},
-{total_iops_sec, VSH_OT_INT, VSH_OFLAG_NONE,
+{total_iops_sec, VSH_OT_ALIAS, 0, total-iops-sec},
+{total-iops-sec, VSH_OT_INT, VSH_OFLAG_NONE,
N_(total I/O operations limit per second)},
-{read_iops_sec, VSH_OT_INT, VSH_OFLAG_NONE,
+{read_iops_sec, VSH_OT_ALIAS, 0, read-iops-sec},
+{read-iops-sec, VSH_OT_INT, VSH_OFLAG_NONE,
N_(read I/O operations limit per second)},
-{write_iops_sec, VSH_OT_INT, VSH_OFLAG_NONE,
+{write_iops_sec, VSH_OT_ALIAS, 0, write-iops-sec},
+{write-iops-sec, VSH_OT_INT, VSH_OFLAG_NONE,
N_(write I/O operations limit per second)},
{config, VSH_OT_BOOL, 0, N_(affect next boot)},
{live, VSH_OT_BOOL, 0, N_(affect running domain)},
@@ -7630,7 +7637,8 @@ cmdBlkdeviotune(vshControl *ctl, const vshCmd *cmd)
if (vshCommandOptString(cmd, device, disk) 0)
goto cleanup;
-if ((rv = vshCommandOptULongLong(cmd, total_bytes_sec,
total_bytes_sec)) 0) {
+if ((rv = vshCommandOptULongLong(cmd, total-bytes-sec,
+ total_bytes_sec)) 0) {
vshError(ctl, %s,
_(Unable to parse integer parameter));
goto cleanup;
@@ -7638,7 +7646,8 @@ cmdBlkdeviotune(vshControl *ctl, const vshCmd *cmd)
nparams++;
}
-if ((rv = vshCommandOptULongLong(cmd, read_bytes_sec, read_bytes_sec))
0) {
+if ((rv = vshCommandOptULongLong(cmd, read-bytes-sec,
+ read_bytes_sec)) 0) {
vshError(ctl, %s,
_(Unable to parse integer parameter));
goto cleanup;
@@ -7646,7 +7655,8 @@ cmdBlkdeviotune(vshControl *ctl, const vshCmd *cmd)
nparams++;
}
-if ((rv = vshCommandOptULongLong(cmd, write_bytes_sec,
write_bytes_sec)) 0) {
+if ((rv = vshCommandOptULongLong(cmd, write-bytes-sec,
+ write_bytes_sec)) 0) {
vshError(ctl, %s,
_(Unable to parse integer parameter));
goto cleanup;
@@ -7654,7 +7664,8 @@ cmdBlkdeviotune(vshControl *ctl, const vshCmd *cmd)
nparams++;
}
-if ((rv = vshCommandOptULongLong(cmd, total_iops_sec, total_iops_sec))
0) {
+if ((rv = vshCommandOptULongLong(cmd, total-iops-sec,
+ total_iops_sec)) 0) {
vshError(ctl, %s,
_(Unable to parse integer parameter));
goto cleanup;
@@ -7662,7 +7673,8 @@ cmdBlkdeviotune(vshControl *ctl, const vshCmd *cmd)
nparams++;
}
-if ((rv = vshCommandOptULongLong(cmd, read_iops_sec, read_iops_sec))
0) {
+if ((rv = vshCommandOptULongLong(cmd, read-iops-sec,
+ read_iops_sec)) 0) {
vshError(ctl, %s,
_(Unable to parse integer parameter));
goto cleanup;
@@ -7670,7 +7682,8 @@ cmdBlkdeviotune(vshControl *ctl, const vshCmd *cmd)
nparams++;
}
-if ((rv = vshCommandOptULongLong(cmd,