Re: [PATCHv2] virsh: use - not _ in memtune option names

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2010/10/26 Eric Blake <eblake@xxxxxxxxxx>:
> * tools/virsh.c (opts_memtune): All other options in virsh use -
> for separating words.
> ---
>
> v2: test correct option names in memtune implementation
>
> Âtools/virsh.c | Â 16 ++++++++--------
> Â1 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/tools/virsh.c b/tools/virsh.c
> index cafd304..a182d4c 100644
> --- a/tools/virsh.c
> +++ b/tools/virsh.c
> @@ -2890,13 +2890,13 @@ static const vshCmdInfo info_memtune[] = {
>
> Âstatic const vshCmdOptDef opts_memtune[] = {
> Â Â {"domain", VSH_OT_DATA, VSH_OFLAG_REQ, N_("domain name, id or uuid")},
> - Â Â{VIR_DOMAIN_MEMORY_HARD_LIMIT, VSH_OT_INT, VSH_OFLAG_NONE,
> + Â Â{"hard-limit", VSH_OT_INT, VSH_OFLAG_NONE,
> Â Â ÂN_("Max memory in kilobytes")},
> - Â Â{VIR_DOMAIN_MEMORY_SOFT_LIMIT, VSH_OT_INT, VSH_OFLAG_NONE,
> + Â Â{"soft-limit", VSH_OT_INT, VSH_OFLAG_NONE,
> Â Â ÂN_("Memory during contention in kilobytes")},
> - Â Â{VIR_DOMAIN_MEMORY_SWAP_HARD_LIMIT, VSH_OT_INT, VSH_OFLAG_NONE,
> + Â Â{"swap-hard-limit", VSH_OT_INT, VSH_OFLAG_NONE,
> Â Â ÂN_("Max swap in kilobytes")},
> - Â Â{VIR_DOMAIN_MEMORY_MIN_GUARANTEE, VSH_OT_INT, VSH_OFLAG_NONE,
> + Â Â{"min-guarantee", VSH_OT_INT, VSH_OFLAG_NONE,
> Â Â ÂN_("Min guaranteed memory in kilobytes")},
> Â Â {NULL, 0, 0, NULL}
> Â};
> @@ -2918,22 +2918,22 @@ cmdMemtune(vshControl * ctl, const vshCmd * cmd)
> Â Â Â Â return FALSE;
>
> Â Â hard_limit =
> - Â Â Â ÂvshCommandOptLongLong(cmd, VIR_DOMAIN_MEMORY_HARD_LIMIT, NULL);
> + Â Â Â ÂvshCommandOptLongLong(cmd, "hard-limit", NULL);
> Â Â if (hard_limit)
> Â Â Â Â nparams++;
>
> Â Â soft_limit =
> - Â Â Â ÂvshCommandOptLongLong(cmd, VIR_DOMAIN_MEMORY_SOFT_LIMIT, NULL);
> + Â Â Â ÂvshCommandOptLongLong(cmd, "soft-limit", NULL);
> Â Â if (soft_limit)
> Â Â Â Â nparams++;
>
> Â Â swap_hard_limit =
> - Â Â Â ÂvshCommandOptLongLong(cmd, VIR_DOMAIN_MEMORY_SWAP_HARD_LIMIT, NULL);
> + Â Â Â ÂvshCommandOptLongLong(cmd, "swap-hard-limit", NULL);
> Â Â if (swap_hard_limit)
> Â Â Â Â nparams++;
>
> Â Â min_guarantee =
> - Â Â Â ÂvshCommandOptLongLong(cmd, VIR_DOMAIN_MEMORY_MIN_GUARANTEE, NULL);
> + Â Â Â ÂvshCommandOptLongLong(cmd, "min-guarantee", NULL);
> Â Â if (min_guarantee)
> Â Â Â Â nparams++;
>
> --
> 1.7.2.3
>

This looks better.

ACK.

Matthias

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]