From bb3fa041831b381e6e3e4a91e985e9735ab1a187 Mon Sep 17 00:00:00 2001 From: Matthias Bolte Date: Sun, 3 Apr 2011 14:19:14 +0200 Subject: [PATCH] vmx: Use case-insensitive compare functions for all content --- src/vmx/vmx.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c index 1d4abf0a46..b0d32188a2 100644 --- a/src/vmx/vmx.c +++ b/src/vmx/vmx.c @@ -732,7 +732,7 @@ virVMXGetConfigLong(virConfPtr conf, const char *name, long long *number, } } - if (STREQ(value->str, "unlimited")) { + if (STRCASEEQ(value->str, "unlimited")) { *number = -1; } else if (virStrToLong_ll(value->str, NULL, 10, number) < 0) { VMX_ERROR(VIR_ERR_INTERNAL_ERROR, @@ -1388,7 +1388,7 @@ virVMXParseConfig(virVMXContext *ctx, virCapsPtr caps, const char *vmx) goto cleanup; } - if (sched_cpu_affinity != NULL && STRNEQ(sched_cpu_affinity, "all")) { + if (sched_cpu_affinity != NULL && STRCASENEQ(sched_cpu_affinity, "all")) { const char *current = sched_cpu_affinity; int number, count = 0; @@ -2135,7 +2135,7 @@ virVMXParseDisk(virVMXContext *ctx, virCapsPtr caps, virConfPtr conf, goto cleanup; } } else if (virFileHasSuffix(fileName, ".iso") || - STREQ(deviceType, "atapi-cdrom")) { + STRCASEEQ(deviceType, "atapi-cdrom")) { /* * This function was called in order to parse a harddisk device, * but .iso files and 'atapi-cdrom' devices are for CDROM devices @@ -2174,7 +2174,7 @@ virVMXParseDisk(virVMXContext *ctx, virCapsPtr caps, virConfPtr conf, * handle it. */ goto ignore; - } else if (STREQ(deviceType, "atapi-cdrom")) { + } else if (STRCASEEQ(deviceType, "atapi-cdrom")) { (*def)->type = VIR_DOMAIN_DISK_TYPE_BLOCK; (*def)->src = fileName; @@ -2202,7 +2202,7 @@ virVMXParseDisk(virVMXContext *ctx, virCapsPtr caps, virConfPtr conf, if ((*def)->src == NULL) { goto cleanup; } - } else if (fileType != NULL && STREQ(fileType, "device")) { + } else if (fileType != NULL && STRCASEEQ(fileType, "device")) { (*def)->type = VIR_DOMAIN_DISK_TYPE_BLOCK; (*def)->src = fileName; -- GitLab