From dc52cab12647845d19285ea3ae2ffc5971f619a3 Mon Sep 17 00:00:00 2001 From: Matthias Bolte Date: Fri, 28 Jan 2011 22:38:06 +0100 Subject: [PATCH] Prefer C style comments over C++ ones Pure cosmetic change. --- daemon/libvirtd.c | 4 ++-- daemon/remote.c | 4 ++-- src/conf/nwfilter_conf.c | 22 ++++++++--------- src/conf/nwfilter_conf.h | 2 +- src/conf/storage_conf.c | 4 ++-- src/lxc/lxc_container.c | 6 ++--- src/nwfilter/nwfilter_ebiptables_driver.c | 6 ++--- src/nwfilter/nwfilter_ebiptables_driver.h | 2 +- src/nwfilter/nwfilter_gentech_driver.c | 12 +++++----- src/nwfilter/nwfilter_learnipaddr.c | 10 ++++---- src/opennebula/one_conf.c | 4 ++-- src/opennebula/one_driver.c | 6 ++--- src/openvz/openvz_conf.c | 2 +- src/openvz/openvz_driver.c | 8 +++---- src/remote/remote_driver.c | 14 +++++------ src/test/test_driver.c | 2 +- src/util/macvtap.c | 14 +++++------ src/util/macvtap.h | 2 +- src/vmx/vmx.c | 29 ++++++----------------- src/xen/xen_hypervisor.c | 2 +- src/xen/xend_internal.c | 8 +++---- src/xen/xs_internal.c | 10 ++++---- src/xenapi/xenapi_driver.c | 1 - src/xenapi/xenapi_driver_private.h | 2 +- 24 files changed, 80 insertions(+), 96 deletions(-) diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c index afc5c083e1..f4b3327139 100644 --- a/daemon/libvirtd.c +++ b/daemon/libvirtd.c @@ -614,7 +614,7 @@ static int qemudListenUnix(struct qemud_server *server, return -1; } -// See: http://people.redhat.com/drepper/userapi-ipv6.html +/* See: http://people.redhat.com/drepper/userapi-ipv6.html */ static int remoteMakeSockets (int *fds, int max_fds, int *nfds_r, const char *node, const char *service) { @@ -1152,7 +1152,7 @@ remoteCheckDN (const char *dname) /* Print the client's DN. */ DEBUG(_("remoteCheckDN: failed: client DN is %s"), dname); - return 0; // Not found. + return 0; /* Not found. */ } static int diff --git a/daemon/remote.c b/daemon/remote.c index 9dba3255c2..aa6a1a42c0 100644 --- a/daemon/remote.c +++ b/daemon/remote.c @@ -790,7 +790,7 @@ remoteDispatchDomainGetSchedulerParameters (struct qemud_server *server ATTRIBUT goto oom; for (i = 0; i < nparams; ++i) { - // remoteDispatchClientRequest will free this: + /* remoteDispatchClientRequest will free this: */ ret->params.params_val[i].field = strdup (params[i].field); if (ret->params.params_val[i].field == NULL) goto oom; @@ -2511,7 +2511,7 @@ remoteDispatchDomainGetMemoryParameters(struct qemud_server *server goto oom; for (i = 0; i < nparams; ++i) { - // remoteDispatchClientRequest will free this: + /* remoteDispatchClientRequest will free this: */ ret->params.params_val[i].field = strdup(params[i].field); if (ret->params.params_val[i].field == NULL) goto oom; diff --git a/src/conf/nwfilter_conf.c b/src/conf/nwfilter_conf.c index dbb72b20ed..a5703cb8b7 100644 --- a/src/conf/nwfilter_conf.c +++ b/src/conf/nwfilter_conf.c @@ -428,11 +428,11 @@ typedef bool (*valueFormatter)(virBufferPtr buf, typedef struct _virXMLAttr2Struct virXMLAttr2Struct; struct _virXMLAttr2Struct { - const char *name; // attribute name + const char *name; /* attribute name */ enum attrDatatype datatype; - int dataIdx; // offset of the hasXYZ boolean - valueValidator validator; // beyond-standard checkers - valueFormatter formatter; // beyond-standard formatter + int dataIdx; /* offset of the hasXYZ boolean */ + valueValidator validator; /* beyond-standard checkers */ + valueFormatter formatter; /* beyond-standard formatter */ size_t maxstrlen; }; @@ -1494,7 +1494,7 @@ virNWFilterRuleDetailsParse(xmlNodePtr node, case DATATYPE_STRING: if (!validator) { - // not supported + /* not supported */ rc = -1; break; } @@ -2314,7 +2314,7 @@ virNWFilterTriggerVMFilterRebuild(virConnectPtr conn) err = cb.err; if (err) { - cb.step = STEP_TEAR_NEW; // rollback + cb.step = STEP_TEAR_NEW; /* rollback */ cb.err = 0; for (i = 0; i < nCallbackDriver; i++) @@ -2322,7 +2322,7 @@ virNWFilterTriggerVMFilterRebuild(virConnectPtr conn) virNWFilterDomainFWUpdateCB, &cb); } else { - cb.step = STEP_TEAR_OLD; // switch over + cb.step = STEP_TEAR_OLD; /* switch over */ for (i = 0; i < nCallbackDriver; i++) callbackDrvArray[i]->vmFilterRebuild(conn, @@ -2345,7 +2345,7 @@ virNWFilterTestUnassignDef(virConnectPtr conn, virNWFilterLockFilterUpdates(); nwfilter->wantRemoved = 1; - // trigger the update on VMs referencing the filter + /* trigger the update on VMs referencing the filter */ if (virNWFilterTriggerVMFilterRebuild(conn)) rc = 1; @@ -2385,7 +2385,7 @@ virNWFilterObjAssignDef(virConnectPtr conn, if ((nwfilter = virNWFilterObjFindByName(nwfilters, def->name))) { virNWFilterLockFilterUpdates(); nwfilter->newDef = def; - // trigger the update on VMs referencing the filter + /* trigger the update on VMs referencing the filter */ if (virNWFilterTriggerVMFilterRebuild(conn)) { nwfilter->newDef = NULL; virNWFilterUnlockFilterUpdates(); @@ -2454,7 +2454,7 @@ virNWFilterObjLoad(virConnectPtr conn, return NULL; } - VIR_FREE(nwfilter->configFile); // for driver reload + VIR_FREE(nwfilter->configFile); /* for driver reload */ nwfilter->configFile = strdup(path); if (nwfilter->configFile == NULL) { virReportOOMError(); @@ -2685,7 +2685,7 @@ virNWFilterRuleDefDetailsFormat(virBufferPtr buf, asHex = true; case DATATYPE_IPMASK: case DATATYPE_IPV6MASK: - // display all masks in CIDR format + /* display all masks in CIDR format */ case DATATYPE_UINT8: virBufferVSprintf(buf, asHex ? "0x%x" : "%d", item->u.u8); diff --git a/src/conf/nwfilter_conf.h b/src/conf/nwfilter_conf.h index b21f5b9b46..8f8383f2c4 100644 --- a/src/conf/nwfilter_conf.h +++ b/src/conf/nwfilter_conf.h @@ -84,7 +84,7 @@ enum virNWFilterEntryItemFlags { # define ENTRY_GET_NEG_SIGN(data) \ ((((data)->flags) & NWFILTER_ENTRY_ITEM_FLAG_IS_NEG) ? "!" : "") -// datatypes appearing in rule attributes +/* datatypes appearing in rule attributes */ enum attrDatatype { DATATYPE_UINT16 = (1 << 0), DATATYPE_UINT8 = (1 << 1), diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index 0c37dc607c..6e3fe0e197 100644 --- a/src/conf/storage_conf.c +++ b/src/conf/storage_conf.c @@ -1435,14 +1435,14 @@ virStoragePoolObjLoad(virStoragePoolObjListPtr pools, return NULL; } - VIR_FREE(pool->configFile); // for driver reload + VIR_FREE(pool->configFile); /* for driver reload */ pool->configFile = strdup(path); if (pool->configFile == NULL) { virReportOOMError(); virStoragePoolDefFree(def); return NULL; } - VIR_FREE(pool->autostartLink); // for driver reload + VIR_FREE(pool->autostartLink); /* for driver reload */ pool->autostartLink = strdup(autostartLink); if (pool->autostartLink == NULL) { virReportOOMError(); diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c index 7013667de3..876bc62c1b 100644 --- a/src/lxc/lxc_container.c +++ b/src/lxc/lxc_container.c @@ -281,7 +281,7 @@ error_out: } -//_syscall2(int, pivot_root, char *, newroot, const char *, oldroot) +/*_syscall2(int, pivot_root, char *, newroot, const char *, oldroot)*/ extern int pivot_root(const char * new_root,const char * put_old); static int lxcContainerChildMountSort(const void *a, const void *b) @@ -526,7 +526,7 @@ static int lxcContainerMountNewFS(virDomainDefPtr vmDef) char *src; if (STREQ(vmDef->fss[i]->dst, "/")) continue; - // XXX fix + /* XXX fix */ if (vmDef->fss[i]->type != VIR_DOMAIN_FS_TYPE_MOUNT) continue; @@ -650,7 +650,7 @@ static int lxcContainerSetupExtraMounts(virDomainDefPtr vmDef) return -1; } for (i = 0 ; i < vmDef->nfss ; i++) { - // XXX fix to support other mount types + /* XXX fix to support other mount types */ if (vmDef->fss[i]->type != VIR_DOMAIN_FS_TYPE_MOUNT) continue; diff --git a/src/nwfilter/nwfilter_ebiptables_driver.c b/src/nwfilter/nwfilter_ebiptables_driver.c index 91a91590a6..1b8730dc90 100644 --- a/src/nwfilter/nwfilter_ebiptables_driver.c +++ b/src/nwfilter/nwfilter_ebiptables_driver.c @@ -997,7 +997,7 @@ iptablesHandleIpHdr(virBufferPtr buf, if (HAS_ENTRY_ITEM(&ipHdr->dataConnlimitAbove)) { if (directionIn) { - // only support for limit in outgoing dir. + /* only support for limit in outgoing dir. */ *skipRule = true; } else { if (printDataType(vars, @@ -3320,7 +3320,7 @@ ebiptablesApplyNewRules(virConnectPtr conn ATTRIBUTE_UNUSED, if (chains_out & (1 << VIR_NWFILTER_CHAINSUFFIX_IPv6)) ebtablesCreateTmpSubChain(&buf, 0, ifname, L3_PROTO_IPV6_IDX, 1); - // keep arp,rarp as last + /* keep arp,rarp as last */ if (chains_in & (1 << VIR_NWFILTER_CHAINSUFFIX_ARP)) ebtablesCreateTmpSubChain(&buf, 1, ifname, L3_PROTO_ARP_IDX, 1); if (chains_out & (1 << VIR_NWFILTER_CHAINSUFFIX_ARP)) @@ -3503,7 +3503,7 @@ ebiptablesTearOldRules(virConnectPtr conn ATTRIBUTE_UNUSED, int cli_status; virBuffer buf = VIR_BUFFER_INITIALIZER; - // switch to new iptables user defined chains + /* switch to new iptables user defined chains */ if (iptables_cmd_path) { iptablesUnlinkRootChains(iptables_cmd_path, &buf, ifname); iptablesRemoveRootChains(iptables_cmd_path, &buf, ifname); diff --git a/src/nwfilter/nwfilter_ebiptables_driver.h b/src/nwfilter/nwfilter_ebiptables_driver.h index 5ee826ea3e..ff3de3cc06 100644 --- a/src/nwfilter/nwfilter_ebiptables_driver.h +++ b/src/nwfilter/nwfilter_ebiptables_driver.h @@ -36,7 +36,7 @@ typedef ebiptablesRuleInst *ebiptablesRuleInstPtr; struct _ebiptablesRuleInst { char *commandTemplate; enum virNWFilterChainSuffixType neededProtocolChain; - char chainprefix; // I for incoming, O for outgoing + char chainprefix; /* I for incoming, O for outgoing */ unsigned int priority; enum RuleType ruleType; }; diff --git a/src/nwfilter/nwfilter_gentech_driver.c b/src/nwfilter/nwfilter_gentech_driver.c index 4361c8ac6c..e64c3ec948 100644 --- a/src/nwfilter/nwfilter_gentech_driver.c +++ b/src/nwfilter/nwfilter_gentech_driver.c @@ -363,7 +363,7 @@ _virNWFilterInstantiateRec(virConnectPtr conn, break; } - // create a temporary hashmap for depth-first tree traversal + /* create a temporary hashmap for depth-first tree traversal */ virNWFilterHashTablePtr tmpvars = virNWFilterCreateVarsFrom(inc->params, vars); @@ -433,7 +433,7 @@ virNWFilterDetermineMissingVarsRec(virConnectPtr conn, virNWFilterRuleDefPtr rule = filter->filterEntries[i]->rule; virNWFilterIncludeDefPtr inc = filter->filterEntries[i]->include; if (rule) { - // check all variables of this rule + /* check all variables of this rule */ for (j = 0; j < rule->nvars; j++) { if (!virHashLookup(vars->hashTable, rule->vars[j])) { virNWFilterHashTablePut(missing_vars, rule->vars[j], @@ -454,7 +454,7 @@ virNWFilterDetermineMissingVarsRec(virConnectPtr conn, break; } - // create a temporary hashmap for depth-first tree traversal + /* create a temporary hashmap for depth-first tree traversal */ virNWFilterHashTablePtr tmpvars = virNWFilterCreateVarsFrom(inc->params, vars); @@ -879,10 +879,10 @@ virNWFilterInstantiateFilterLate(virConnectPtr conn, true, &foundNewFilter); if (rc) { - //something went wrong... 'DOWN' the interface + /* something went wrong... 'DOWN' the interface */ if (ifaceCheck(false, ifname, NULL, ifindex) != 0 || ifaceDown(ifname)) { - // assuming interface disappeared... + /* assuming interface disappeared... */ _virNWFilterTeardownFilter(ifname); } } @@ -1033,7 +1033,7 @@ virNWFilterDomainFWUpdateCB(void *payload, net, &skipIface); if (cb->err == 0 && skipIface == true) { - // filter tree unchanged -- no update needed + /* filter tree unchanged -- no update needed */ cb->err = virHashAddEntry(cb->skipInterfaces, net->ifname, (void *)~0); diff --git a/src/nwfilter/nwfilter_learnipaddr.c b/src/nwfilter/nwfilter_learnipaddr.c index 15473fb5ec..c593481631 100644 --- a/src/nwfilter/nwfilter_learnipaddr.c +++ b/src/nwfilter/nwfilter_learnipaddr.c @@ -538,7 +538,7 @@ learnIPAddressThread(void *arg) if (memcmp(ether_hdr->ether_shost, req->macaddr, VIR_MAC_BUFLEN) == 0) { - // packets from the VM + /* packets from the VM */ if (etherType == ETHERTYPE_IP && (header.len >= ethHdrSize + @@ -546,9 +546,9 @@ learnIPAddressThread(void *arg) struct iphdr *iphdr = (struct iphdr*)(packet + ethHdrSize); vmaddr = iphdr->saddr; - // skip mcast addresses (224.0.0.0 - 239.255.255.255), - // class E (240.0.0.0 - 255.255.255.255, includes eth. - // bcast) and zero address in DHCP Requests + /* skip mcast addresses (224.0.0.0 - 239.255.255.255), + * class E (240.0.0.0 - 255.255.255.255, includes eth. + * bcast) and zero address in DHCP Requests */ if ( (ntohl(vmaddr) & 0xe0000000) == 0xe0000000 || vmaddr == 0) { vmaddr = 0; @@ -575,7 +575,7 @@ learnIPAddressThread(void *arg) } else if (memcmp(ether_hdr->ether_dhost, req->macaddr, VIR_MAC_BUFLEN) == 0) { - // packets to the VM + /* packets to the VM */ if (etherType == ETHERTYPE_IP && (header.len >= ethHdrSize + sizeof(struct iphdr))) { diff --git a/src/opennebula/one_conf.c b/src/opennebula/one_conf.c index 60afca529c..9f0ed26e23 100644 --- a/src/opennebula/one_conf.c +++ b/src/opennebula/one_conf.c @@ -191,7 +191,7 @@ char* xmlOneTemplate(virDomainDefPtr def) } /* set Disks & NICS */ for (i=0 ; i < def->ndisks ; i++) { - // missing source is only allowed at cdrom and floppy + /* missing source is only allowed at cdrom and floppy */ if (def->disks[i]->device == VIR_DOMAIN_DISK_DEVICE_DISK) { virBufferVSprintf(&buf, "DISK=[ type = disk,\n" "\tsource = \"%s\",\n", @@ -269,7 +269,7 @@ char* xmlOneTemplate(virDomainDefPtr def) virBufferAddLit(&buf," ]\n"); } - else //graphics.type==VIR_DOMAIN_GRAPHICS_TYPE_SDL + else /* graphics.type==VIR_DOMAIN_GRAPHICS_TYPE_SDL */ virBufferAddLit(&buf,"GRAPHICS = [\n type = \"sdl\" ]\n"); } diff --git a/src/opennebula/one_driver.c b/src/opennebula/one_driver.c index 4febb46b0f..6945f91382 100644 --- a/src/opennebula/one_driver.c +++ b/src/opennebula/one_driver.c @@ -333,7 +333,7 @@ static int oneDomainGetInfo(virDomainPtr dom, } else { char vm_info[257]; c_oneVmInfo(vm->pid,vm_info,256); - //State: + /* State: */ char* cptr = strstr(vm_info,"STATE"); cptr = index(cptr, ':'); cptr++; @@ -357,13 +357,13 @@ static int oneDomainGetInfo(virDomainPtr dom, default: break; }; - //Memory: + /* Memory: */ cptr=strstr(vm_info,"MEMORY"); cptr=index(cptr,':'); cptr++; vm->def->mem.cur_balloon = atoi(cptr); - //run time: + /* run time: */ cptr=strstr(vm_info,"START TIME"); cptr=index(cptr,':'); cptr++; diff --git a/src/openvz/openvz_conf.c b/src/openvz/openvz_conf.c index a729f5919a..dae66a5c27 100644 --- a/src/openvz/openvz_conf.c +++ b/src/openvz/openvz_conf.c @@ -287,7 +287,7 @@ openvzReadNetworkConf(virDomainDefPtr def, } else if (STRPREFIX(p, "mac=")) { p += 4; len = next - p; - if (len != 17) { //should be 17 + if (len != 17) { /* should be 17 */ openvzError(VIR_ERR_INTERNAL_ERROR, "%s", _("Wrong length MAC address")); goto error; diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c index fc6ae296d3..1dde004801 100644 --- a/src/openvz/openvz_driver.c +++ b/src/openvz/openvz_driver.c @@ -714,7 +714,7 @@ openvzDomainSetNetwork(virConnectPtr conn, const char *vpsid, virBuffer buf = VIR_BUFFER_INITIALIZER; int veid = openvzGetVEID(vpsid); - //--netif_add ifname[,mac,host_ifname,host_mac] + /* --netif_add ifname[,mac,host_ifname,host_mac] */ ADD_ARG_LIT("--netif_add") ; /* if user doesn't specify guest interface name, @@ -765,12 +765,12 @@ openvzDomainSetNetwork(virConnectPtr conn, const char *vpsid, VIR_FREE(opt); } else if (net->type == VIR_DOMAIN_NET_TYPE_ETHERNET && net->data.ethernet.ipaddr != NULL) { - //--ipadd ip + /* --ipadd ip */ ADD_ARG_LIT("--ipadd") ; ADD_ARG_LIT(net->data.ethernet.ipaddr) ; } - //TODO: processing NAT and physical device + /* TODO: processing NAT and physical device */ if (prog[0] != NULL) { ADD_ARG_LIT("--save"); @@ -882,7 +882,7 @@ openvzDomainDefineXML(virConnectPtr conn, const char *xml) goto cleanup; } - //TODO: set quota + /* TODO: set quota */ if (openvzSetDefinedUUID(strtoI(vm->def->name), vm->def->uuid) < 0) { openvzError(VIR_ERR_INTERNAL_ERROR, "%s", diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index 840e481d30..1a91f852d6 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -589,7 +589,7 @@ doRemoteOpen (virConnectPtr conn, /*FALLTHROUGH*/ case trans_tcp: { - // http://people.redhat.com/drepper/userapi-ipv6.html + /* http://people.redhat.com/drepper/userapi-ipv6.html */ struct addrinfo *res, *r; struct addrinfo hints; int saved_errno = EINVAL; @@ -656,8 +656,8 @@ doRemoteOpen (virConnectPtr conn, tcp_connected: freeaddrinfo (res); - // NB. All versioning is done by the RPC headers, so we don't - // need to worry (at this point anyway) about versioning. + /* NB. All versioning is done by the RPC headers, so we don't + * need to worry (at this point anyway) about versioning. */ break; } @@ -748,8 +748,8 @@ doRemoteOpen (virConnectPtr conn, if (command == NULL) goto out_of_memory; - // Generate the final command argv[] array. - // ssh [-p $port] [-l $username] $hostname $netcat -U $sockname [NULL] + /* Generate the final command argv[] array. + * ssh [-p $port] [-l $username] $hostname $netcat -U $sockname [NULL] */ if (VIR_ALLOC_N(cmd_argv, nr_args) < 0) goto out_of_memory; @@ -2444,7 +2444,7 @@ remoteDomainSetMemoryParameters (virDomainPtr domain, do_error = 0; for (i = 0; i < nparams; ++i) { - // call() will free this: + /* call() will free this: */ args.params.params_val[i].field = strdup (params[i].field); if (args.params.params_val[i].field == NULL) { virReportOOMError(); @@ -3773,7 +3773,7 @@ remoteDomainSetSchedulerParameters (virDomainPtr domain, do_error = 0; for (i = 0; i < nparams; ++i) { - // call() will free this: + /* call() will free this: */ args.params.params_val[i].field = strdup (params[i].field); if (args.params.params_val[i].field == NULL) { virReportOOMError(); diff --git a/src/test/test_driver.c b/src/test/test_driver.c index caf823bb69..15e90c8033 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -538,7 +538,7 @@ static int testOpenDefault(virConnectPtr conn) { memmove(&privconn->nodeInfo, &defaultNodeInfo, sizeof(defaultNodeInfo)); - // Numa setup + /* Numa setup */ privconn->numCells = 2; for (u = 0; u < 2; ++u) { privconn->cells[u].numCpus = 8; diff --git a/src/util/macvtap.c b/src/util/macvtap.c index 96df301f9d..019441cdd8 100644 --- a/src/util/macvtap.c +++ b/src/util/macvtap.c @@ -436,7 +436,7 @@ int openTap(const char *ifname, } while (1) { - // may need to wait for udev to be done + /* may need to wait for udev to be done */ tapfd = open(tapname, O_RDWR); if (tapfd < 0 && retries > 0) { retries--; @@ -1232,7 +1232,7 @@ doPortProfileOpCommon(bool nltarget_kernel, status == PORT_VDP_RESPONSE_SUCCESS) { break; } else if (status == PORT_PROFILE_RESPONSE_INPROGRESS) { - // keep trying... + /* keep trying... */ } else { virReportSystemError(EINVAL, _("error %d during port-profile setlink on " @@ -1384,11 +1384,11 @@ getPhysfn(const char *linkdev, if (virtfn) { - // XXX: if linkdev is SR-IOV VF, then set vf = VF index - // XXX: and set linkdev = PF device - // XXX: need to use get_physical_function_linux() or - // XXX: something like that to get PF - // XXX: device and figure out VF index + /* XXX: if linkdev is SR-IOV VF, then set vf = VF index */ + /* XXX: and set linkdev = PF device */ + /* XXX: need to use get_physical_function_linux() or */ + /* XXX: something like that to get PF */ + /* XXX: device and figure out VF index */ rc = 1; diff --git a/src/util/macvtap.h b/src/util/macvtap.h index 3ae2c24029..54205c7613 100644 --- a/src/util/macvtap.h +++ b/src/util/macvtap.h @@ -47,7 +47,7 @@ struct _virVirtualPortProfileParams { union { struct { uint8_t managerID; - uint32_t typeID; // 24 bit valid + uint32_t typeID; /* 24 bit valid */ uint8_t typeIDVersion; unsigned char instanceID[VIR_UUID_BUFLEN]; } virtPort8021Qbg; diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c index 2f574fc4d4..9f4d5fbbb1 100644 --- a/src/vmx/vmx.c +++ b/src/vmx/vmx.c @@ -1097,7 +1097,7 @@ virVMXGatherSCSIControllers(virVMXContext *ctx, virDomainDefPtr def, controller = def->controllers[i]; if (controller->type != VIR_DOMAIN_CONTROLLER_TYPE_SCSI) { - // skip non-SCSI controllers + /* skip non-SCSI controllers */ continue; } @@ -1114,7 +1114,7 @@ virVMXGatherSCSIControllers(virVMXContext *ctx, virDomainDefPtr def, } if (! controllerHasDisksAttached) { - // skip SCSI controllers without attached disks + /* skip SCSI controllers without attached disks */ continue; } @@ -1122,8 +1122,8 @@ virVMXGatherSCSIControllers(virVMXContext *ctx, virDomainDefPtr def, ctx->autodetectSCSIControllerModel != NULL) { count = 0; - // try to autodetect the SCSI controller model by collecting - // SCSI controller model of all disks attached to this controller + /* try to autodetect the SCSI controller model by collecting + * SCSI controller model of all disks attached to this controller */ for (k = 0; k < def->ndisks; ++k) { disk = def->disks[k]; @@ -1139,8 +1139,8 @@ virVMXGatherSCSIControllers(virVMXContext *ctx, virDomainDefPtr def, } } - // autodetection fails when the disks attached to one controller - // have inconsistent SCSI controller models + /* autodetection fails when the disks attached to one controller + * have inconsistent SCSI controller models */ for (k = 0; k < count; ++k) { if (autodetectedModels[k] != autodetectedModels[0]) { VMX_ERROR(VIR_ERR_INTERNAL_ERROR, @@ -1379,7 +1379,7 @@ virVMXParseConfig(virVMXContext *ctx, virCapsPtr caps, const char *vmx) def->maxvcpus = def->vcpus = numvcpus; /* vmx:sched.cpu.affinity -> def:cpumask */ - // VirtualMachine:config.cpuAffinity.affinitySet + /* NOTE: maps to VirtualMachine:config.cpuAffinity.affinitySet */ if (virVMXGetConfigString(conf, "sched.cpu.affinity", &sched_cpu_affinity, true) < 0) { goto cleanup; @@ -1856,21 +1856,6 @@ virVMXParseSCSIController(virConfPtr conf, int controller, bool *present, -/* -struct _virDomainDiskDef { - int type; // partly done - int device; // done - int bus; // done - char *src; // done - char *dst; // done - char *driverName; // done - char *driverType; - int cachemode; // done - unsigned int readonly : 1; - unsigned int shared : 1; - int slotnum; -};*/ - int virVMXParseDisk(virVMXContext *ctx, virCapsPtr caps, virConfPtr conf, int device, int busType, int controllerOrBus, int unit, diff --git a/src/xen/xen_hypervisor.c b/src/xen/xen_hypervisor.c index 229ef3d4d5..4a0924fc6c 100644 --- a/src/xen/xen_hypervisor.c +++ b/src/xen/xen_hypervisor.c @@ -2313,7 +2313,7 @@ xenHypervisorBuildCapabilities(virConnectPtr conn, 1, 1) == NULL) goto no_memory; - // In Xen 3.1.0, APIC is always on and can't be toggled + /* In Xen 3.1.0, APIC is always on and can't be toggled */ if (virCapabilitiesAddGuestFeature(guest, "apic", 1, diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c index 00fcbf2b26..cd30336b98 100644 --- a/src/xen/xend_internal.c +++ b/src/xen/xend_internal.c @@ -795,7 +795,7 @@ xenDaemonOpen_tcp(virConnectPtr conn, const char *host, const char *port) priv->addrlen = 0; memset(&priv->addr, 0, sizeof(priv->addr)); - // http://people.redhat.com/drepper/userapi-ipv6.html + /* http://people.redhat.com/drepper/userapi-ipv6.html */ memset (&hints, 0, sizeof hints); hints.ai_socktype = SOCK_STREAM; hints.ai_flags = AI_ADDRCONFIG; @@ -1895,7 +1895,7 @@ xenDaemonParseSxprGraphicsNew(virConnectPtr conn, port = xenStoreDomainGetVNCPort(conn, def->id); xenUnifiedUnlock(priv); - // Didn't find port entry in xenstore + /* Didn't find port entry in xenstore */ if (port == -1) { const char *str = sexpr_node(node, "device/vfb/vncdisplay"); int val; @@ -3215,7 +3215,7 @@ xenDaemonDomainDumpXML(virDomainPtr domain, int flags, const char *cpus) priv = (xenUnifiedPrivatePtr) domain->conn->privateData; if (domain->id < 0 && priv->xendConfigVersion < 3) { - // fall-through to the next driver to handle + /* fall-through to the next driver to handle */ return(NULL); } @@ -4380,7 +4380,7 @@ xenDaemonDomainSetAutostart(virDomainPtr domain, goto error; } - // Change the autostart value in place, then define the new sexpr + /* Change the autostart value in place, then define the new sexpr */ VIR_FREE(autonode->u.s.car->u.value); autonode->u.s.car->u.value = (autostart ? strdup("start") : strdup("ignore")); diff --git a/src/xen/xs_internal.c b/src/xen/xs_internal.c index 2693b6ef00..7fff560012 100644 --- a/src/xen/xs_internal.c +++ b/src/xen/xs_internal.c @@ -1078,11 +1078,11 @@ int xenStoreDomainGetUUID(virConnectPtr conn, snprintf(prop, 199, "/local/domain/%d/vm", id); prop[199] = 0; - // This will return something like - // /vm/00000000-0000-0000-0000-000000000000 + /* This will return something like + * /vm/00000000-0000-0000-0000-000000000000 */ uuidstr = xs_read(priv->xshandle, 0, prop, &len); - // remove "/vm/" + /* remove "/vm/" */ ret = virUUIDParse(uuidstr + 4, uuid); VIR_FREE(uuidstr); @@ -1305,7 +1305,7 @@ retry: } nread = xenStoreDoListDomains(conn, priv, new_domids, new_domain_cnt); if (nread != new_domain_cnt) { - // mismatch. retry this read + /* mismatch. retry this read */ VIR_FREE(new_domids); goto retry; } @@ -1388,7 +1388,7 @@ retry: } nread = xenStoreDoListDomains(conn, priv, new_domids, new_domain_cnt); if (nread != new_domain_cnt) { - // mismatch. retry this read + /* mismatch. retry this read */ VIR_FREE(new_domids); goto retry; } diff --git a/src/xenapi/xenapi_driver.c b/src/xenapi/xenapi_driver.c index fffa6170f8..aac112bfd2 100644 --- a/src/xenapi/xenapi_driver.c +++ b/src/xenapi/xenapi_driver.c @@ -1918,7 +1918,6 @@ int call_func(const void *data, size_t len, void *user_handle, void *result_handle, xen_result_func result_func) { - //(void)user_handle; struct _xenapiPrivate *priv = (struct _xenapiPrivate *)user_handle; #ifdef PRINT_XML printf("\n\n---Data to server: -----------------------\n"); diff --git a/src/xenapi/xenapi_driver_private.h b/src/xenapi/xenapi_driver_private.h index 2e96771177..cfcaa7572f 100644 --- a/src/xenapi/xenapi_driver_private.h +++ b/src/xenapi/xenapi_driver_private.h @@ -27,7 +27,7 @@ # include # include "virterror_internal.h" -//# define PRINT_XML +/*# define PRINT_XML*/ # define VIR_FROM_THIS VIR_FROM_XENAPI # define LIBVIRT_MODELNAME_LEN (32) # define xenapiSessionErrorHandler(conn, errNum, buf) \