? foo ? docs/APIchunk5.html ? docs/APIchunk6.html ? docs/apibuild.pyc ? docs/examples/.deps ? docs/examples/.libs ? tests/foo Index: src/xm_internal.c =================================================================== RCS file: /data/cvs/libvirt/src/xm_internal.c,v retrieving revision 1.28 diff -u -p -r1.28 xm_internal.c --- src/xm_internal.c 7 Jun 2007 14:08:35 -0000 1.28 +++ src/xm_internal.c 7 Jun 2007 14:53:06 -0000 @@ -824,8 +824,10 @@ char *xenXMDomainFormatXML(virConnectPtr char script[PATH_MAX]; char ip[16]; char mac[18]; + char bridge[50]; char *key; + bridge[0] = '\0'; mac[0] = '\0'; script[0] = '\0'; ip[0] = '\0'; @@ -849,7 +851,12 @@ char *xenXMDomainFormatXML(virConnectPtr strncpy(mac, data, len); mac[len] = '\0'; } else if (!strncmp(key, "bridge=", 7)) { + int len = nextkey ? (nextkey - data) : sizeof(bridge)-1; type = 1; + if (len > (sizeof(bridge)-1)) + len = sizeof(bridge)-1; + strncpy(bridge, data, len); + bridge[len] = '\0'; } else if (!strncmp(key, "script=", 7)) { int len = nextkey ? (nextkey - data) : PATH_MAX-1; if (len > (PATH_MAX-1)) @@ -879,6 +886,8 @@ char *xenXMDomainFormatXML(virConnectPtr virBufferAdd(buf, " \n", -1); if (mac[0]) virBufferVSprintf(buf, " \n", mac); + if (type == 1 && bridge[0]) + virBufferVSprintf(buf, " \n", bridge); if (script[0]) virBufferVSprintf(buf, "