[libvirt] [PATCH] xend driver: handle new-format sched-credit options

john.levon at sun.com john.levon at sun.com
Fri Jan 23 01:49:22 UTC 2009


# HG changeset patch
# User john.levon at sun.com
# Date 1232675291 28800
# Node ID ad7f82da983cc0ba07f7f4e94a2f23a4edc3be57
# Parent  3ef027308b88b47b2f3ca721bf88f2e606d8e3bc
xend driver: handle new-format sched-credit options

Signed-off-by: John Levon <john.levon at sun.com>

diff --git a/src/xend_internal.c b/src/xend_internal.c
--- a/src/xend_internal.c
+++ b/src/xend_internal.c
@@ -4634,9 +4634,15 @@ xenDaemonSetSchedulerParameters(virDomai
                 if (STREQ (params[i].field, str_weight) &&
                     params[i].type == VIR_DOMAIN_SCHED_FIELD_UINT) {
                     snprintf(buf_weight, sizeof(buf_weight), "%u", params[i].value.ui);
+                } else if (STREQ (params[i].field, str_weight) &&
+                    params[i].type == VIR_DOMAIN_SCHED_FIELD_LLONG) {
+                    snprintf(buf_weight, sizeof(buf_weight), "%lld", params[i].value.l);
                 } else if (STREQ (params[i].field, str_cap) &&
                     params[i].type == VIR_DOMAIN_SCHED_FIELD_UINT) {
                     snprintf(buf_cap, sizeof(buf_cap), "%u", params[i].value.ui);
+                } else if (STREQ (params[i].field, str_cap) &&
+                    params[i].type == VIR_DOMAIN_SCHED_FIELD_LLONG) {
+                    snprintf(buf_cap, sizeof(buf_cap), "%lld", params[i].value.l);
                 } else {
                     virXendError(domain->conn, VIR_ERR_INVALID_ARG, __FUNCTION__);
                     goto error;




More information about the libvir-list mailing list