To get them under the common VIR_DOMAIN_MEMORY_* prefix. --- include/libvirt/libvirt.h.in | 4 ++-- src/lxc/lxc_driver.c | 4 ++-- src/qemu/qemu_driver.c | 4 ++-- tools/virsh.c | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in index 4cdf5b4..81db3a2 100644 --- a/include/libvirt/libvirt.h.in +++ b/include/libvirt/libvirt.h.in @@ -722,13 +722,13 @@ typedef enum { #define VIR_DOMAIN_MEMORY_MIN_GUARANTEE "min_guarantee" /** - * VIR_DOMAIN_SWAP_HARD_LIMIT: + * VIR_DOMAIN_MEMORY_SWAP_HARD_LIMIT: * * Macro for the swap tunable swap_hard_limit: it represents the maximum swap * the guest can use. */ -#define VIR_DOMAIN_SWAP_HARD_LIMIT "swap_hard_limit" +#define VIR_DOMAIN_MEMORY_SWAP_HARD_LIMIT "swap_hard_limit" /** * virDomainMemoryParameter: diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index 0145d5e..d39b60e 100644 --- a/src/lxc/lxc_driver.c +++ b/src/lxc/lxc_driver.c @@ -746,7 +746,7 @@ static int lxcDomainSetMemoryParameters(virDomainPtr dom, _("unable to set memory soft_limit tunable")); ret = -1; } - } else if (STREQ(param->field, VIR_DOMAIN_SWAP_HARD_LIMIT)) { + } else if (STREQ(param->field, VIR_DOMAIN_MEMORY_SWAP_HARD_LIMIT)) { int rc; if (param->type != VIR_DOMAIN_MEMORY_PARAM_ULLONG) { lxcError(VIR_ERR_INVALID_ARG, "%s", @@ -873,7 +873,7 @@ static int lxcDomainGetMemoryParameters(virDomainPtr dom, ret = -1; continue; } - if (virStrcpyStatic(param->field, VIR_DOMAIN_SWAP_HARD_LIMIT) == NULL) { + if (virStrcpyStatic(param->field, VIR_DOMAIN_MEMORY_SWAP_HARD_LIMIT) == NULL) { lxcError(VIR_ERR_INTERNAL_ERROR, "%s", _("Field swap hard limit too long for destination")); ret = -1; diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index d1ab128..6395c93 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -9594,7 +9594,7 @@ static int qemuDomainSetMemoryParameters(virDomainPtr dom, _("unable to set memory soft_limit tunable")); ret = -1; } - } else if (STREQ(param->field, VIR_DOMAIN_SWAP_HARD_LIMIT)) { + } else if (STREQ(param->field, VIR_DOMAIN_MEMORY_SWAP_HARD_LIMIT)) { int rc; if (param->type != VIR_DOMAIN_MEMORY_PARAM_ULLONG) { qemuReportError(VIR_ERR_INVALID_ARG, "%s", @@ -9726,7 +9726,7 @@ static int qemuDomainGetMemoryParameters(virDomainPtr dom, ret = -1; continue; } - if (virStrcpyStatic(param->field, VIR_DOMAIN_SWAP_HARD_LIMIT) == NULL) { + if (virStrcpyStatic(param->field, VIR_DOMAIN_MEMORY_SWAP_HARD_LIMIT) == NULL) { qemuReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Field swap hard limit too long for destination")); ret = -1; diff --git a/tools/virsh.c b/tools/virsh.c index 7fb7fbd..d1ef698 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -2894,7 +2894,7 @@ static const vshCmdOptDef opts_memtune[] = { N_("Max memory in kilobytes")}, {VIR_DOMAIN_MEMORY_SOFT_LIMIT, VSH_OT_STRING, VSH_OFLAG_NONE, N_("Memory during contention in kilobytes")}, - {VIR_DOMAIN_SWAP_HARD_LIMIT, VSH_OT_STRING, VSH_OFLAG_NONE, + {VIR_DOMAIN_MEMORY_SWAP_HARD_LIMIT, VSH_OT_STRING, VSH_OFLAG_NONE, N_("Max swap in kilobytes")}, {VIR_DOMAIN_MEMORY_MIN_GUARANTEE, VSH_OT_STRING, VSH_OFLAG_NONE, N_("Min guaranteed memory in kilobytes")}, @@ -2928,7 +2928,7 @@ cmdMemtune(vshControl * ctl, const vshCmd * cmd) nparams++; swap_hard_limit = - vshCommandOptInt(cmd, VIR_DOMAIN_SWAP_HARD_LIMIT, + vshCommandOptInt(cmd, VIR_DOMAIN_MEMORY_SWAP_HARD_LIMIT, &swap_hard_limit); if (swap_hard_limit) nparams++; @@ -3015,7 +3015,7 @@ cmdMemtune(vshControl * ctl, const vshCmd * cmd) hard_limit = 0; } else if (swap_hard_limit) { temp->value.ul = swap_hard_limit; - strncpy(temp->field, VIR_DOMAIN_SWAP_HARD_LIMIT, + strncpy(temp->field, VIR_DOMAIN_MEMORY_SWAP_HARD_LIMIT, sizeof(temp->field)); swap_hard_limit = 0; } else if (min_guarantee) { -- 1.7.0.4 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list