mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 11:35:19 +00:00
* src/xen_internal.c: Fix detection of host PAE capabilities,
nul-terminate the token in the output XML and a couple of cleanups for determining structure sizes.
This commit is contained in:
parent
fb624fbecf
commit
ba83eae40f
@ -1,3 +1,9 @@
|
||||
Fri Mar 23 09:12:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
|
||||
|
||||
* src/xen_internal.c: Fix detection of host PAE capabilities,
|
||||
nul-terminate the token in the output XML and a couple of
|
||||
cleanups for determining structure sizes.
|
||||
|
||||
Thu Mar 22 19:38:38 CET 2007 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* qemud/iptables.c qemud/qemud.c src/conf.c src/hash.c src/libvirt.c
|
||||
|
@ -1523,7 +1523,7 @@ xenHypervisorGetCapabilities (virConnectPtr conn)
|
||||
strncpy (hvm_type,
|
||||
&line[subs[1].rm_so], subs[1].rm_eo-subs[1].rm_so+1);
|
||||
hvm_type[subs[1].rm_eo-subs[1].rm_so] = '\0';
|
||||
} else if (regexec (&flags_hvm_rec, line, 0, NULL, 0) == 0)
|
||||
} else if (regexec (&flags_pae_rec, line, 0, NULL, 0) == 0)
|
||||
host_pae = 1;
|
||||
}
|
||||
|
||||
@ -1573,10 +1573,12 @@ xenHypervisorGetCapabilities (virConnectPtr conn)
|
||||
* this buffer. Parse out the features from each token.
|
||||
*/
|
||||
for (str = line, nr_guest_archs = 0;
|
||||
nr_guest_archs < (sizeof(guest_archs)/sizeof(struct guest_arch))
|
||||
nr_guest_archs < sizeof guest_archs / sizeof guest_archs[0]
|
||||
&& (token = strtok_r (str, " ", &saveptr)) != NULL;
|
||||
str = NULL) {
|
||||
if (regexec (&xen_cap_rec, token, (sizeof(subs)/sizeof(regmatch_t)), subs, 0) == 0) {
|
||||
if (regexec (&xen_cap_rec, token, sizeof subs / sizeof subs[0],
|
||||
subs, 0) == 0) {
|
||||
token[subs[0].rm_eo] = '\0';
|
||||
guest_archs[nr_guest_archs].token = token;
|
||||
guest_archs[nr_guest_archs].hvm =
|
||||
strncmp (&token[subs[1].rm_so], "hvm", 3) == 0;
|
||||
|
Loading…
Reference in New Issue
Block a user