aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2011-04-30 10:34:49 -0600
committerEric Blake <eblake@redhat.com>2011-05-05 13:47:40 -0600
commit68ea80cfdd41bc3adbe70ac5d0a9c396c81690a3 (patch)
treeee1b6b553cc2a70a92d378607747b1ac24474f1e /docs
parentdocs: <filesystem> attr is 'accessmode', not 'mode' (diff)
downloadlibvirt-68ea80cfdd41bc3adbe70ac5d0a9c396c81690a3.tar.gz
libvirt-68ea80cfdd41bc3adbe70ac5d0a9c396c81690a3.tar.bz2
libvirt-68ea80cfdd41bc3adbe70ac5d0a9c396c81690a3.zip
maint: rename virBufferVSprintf to virBufferAsprintf
We already have virAsprintf, so picking a similar name helps for seeing a similar purpose. Furthermore, the prefix V before printf generally implies 'va_list', even though this variant was '...', and the old name got in the way of adding a new va_list version. global rename performed with: $ git grep -l virBufferVSprintf \ | xargs -L1 sed -i 's/virBufferVSprintf/virBufferAsprintf/g' then revert the changes in ChangeLog-old.
Diffstat (limited to 'docs')
-rw-r--r--docs/api_extension/0008-support-new-xml.patch46
-rw-r--r--docs/api_extension/0010-improve-vcpu-support-in-qemu-command-line.patch8
-rw-r--r--docs/api_extension/0012-improve-vcpu-support-in-xen-command-line.patch12
-rw-r--r--docs/hacking.html.in2
-rw-r--r--docs/news.html.in4
5 files changed, 36 insertions, 36 deletions
diff --git a/docs/api_extension/0008-support-new-xml.patch b/docs/api_extension/0008-support-new-xml.patch
index 821cfa55c..276b339ca 100644
--- a/docs/api_extension/0008-support-new-xml.patch
+++ b/docs/api_extension/0008-support-new-xml.patch
@@ -107,7 +107,7 @@ index 78d7a6a..a997e06 100644
allones = 0;
- if (allones) {
-- virBufferVSprintf(&buf, " <vcpu>%lu</vcpu>\n", def->vcpus);
+- virBufferAsprintf(&buf, " <vcpu>%lu</vcpu>\n", def->vcpus);
- } else {
+ virBufferAddLit(&buf, " <vcpu");
+ if (!allones) {
@@ -115,14 +115,14 @@ index 78d7a6a..a997e06 100644
if ((cpumask =
virDomainCpuSetFormat(def->cpumask, def->cpumasklen)) == NULL)
goto cleanup;
-- virBufferVSprintf(&buf, " <vcpu cpuset='%s'>%lu</vcpu>\n",
+- virBufferAsprintf(&buf, " <vcpu cpuset='%s'>%lu</vcpu>\n",
- cpumask, def->vcpus);
-+ virBufferVSprintf(&buf, " cpuset='%s'", cpumask);
++ virBufferAsprintf(&buf, " cpuset='%s'", cpumask);
VIR_FREE(cpumask);
}
+ if (def->vcpus != def->maxvcpus)
-+ virBufferVSprintf(&buf, " current='%u'", def->vcpus);
-+ virBufferVSprintf(&buf, ">%u</vcpu>\n", def->maxvcpus);
++ virBufferAsprintf(&buf, " current='%u'", def->vcpus);
++ virBufferAsprintf(&buf, ">%u</vcpu>\n", def->maxvcpus);
if (def->os.bootloader) {
virBufferEscapeString(&buf, " <bootloader>%s</bootloader>\n",
@@ -184,8 +184,8 @@ index 7ec8c0e..0a26614 100644
goto cleanup;
}
-- virBufferVSprintf(&buffer, "numvcpus = \"%d\"\n", (int)def->vcpus);
-+ virBufferVSprintf(&buffer, "numvcpus = \"%d\"\n", def->maxvcpus);
+- virBufferAsprintf(&buffer, "numvcpus = \"%d\"\n", (int)def->vcpus);
++ virBufferAsprintf(&buffer, "numvcpus = \"%d\"\n", def->maxvcpus);
/* def:cpumask -> vmx:sched.cpu.affinity */
if (def->cpumasklen > 0) {
@@ -221,8 +221,8 @@ index 44e28dc..2079c51 100644
{
int i;
virBuffer buf= VIR_BUFFER_INITIALIZER;
-- virBufferVSprintf(&buf,"#OpenNebula Template automatically generated by libvirt\nNAME = %s\nCPU = %ld\nMEMORY = %ld\n",
-+ virBufferVSprintf(&buf,"#OpenNebula Template automatically generated "
+- virBufferAsprintf(&buf,"#OpenNebula Template automatically generated by libvirt\nNAME = %s\nCPU = %ld\nMEMORY = %ld\n",
++ virBufferAsprintf(&buf,"#OpenNebula Template automatically generated "
+ "by libvirt\nNAME = %s\nCPU = %d\nMEMORY = %ld\n",
def->name,
- def->vcpus,
@@ -311,19 +311,19 @@ index 83c0f83..38c8351 100644
{
virBuffer buf = VIR_BUFFER_INITIALIZER;
-- virBufferVSprintf(&buf, "%lu", def->vcpus);
-+ virBufferVSprintf(&buf, "%u", def->vcpus);
+- virBufferAsprintf(&buf, "%lu", def->vcpus);
++ virBufferAsprintf(&buf, "%u", def->vcpus);
if ((qemuCmdFlags & QEMUD_CMD_FLAG_SMP_TOPOLOGY)) {
/* sockets, cores, and threads are either all zero
@@ -3722,11 +3722,18 @@ qemuBuildSmpArgStr(const virDomainDefPtr def,
- virBufferVSprintf(&buf, ",threads=%u", def->cpu->threads);
+ virBufferAsprintf(&buf, ",threads=%u", def->cpu->threads);
}
else {
-- virBufferVSprintf(&buf, ",sockets=%lu", def->vcpus);
-+ virBufferVSprintf(&buf, ",sockets=%u", def->maxvcpus);
- virBufferVSprintf(&buf, ",cores=%u", 1);
- virBufferVSprintf(&buf, ",threads=%u", 1);
+- virBufferAsprintf(&buf, ",sockets=%lu", def->vcpus);
++ virBufferAsprintf(&buf, ",sockets=%u", def->maxvcpus);
+ virBufferAsprintf(&buf, ",cores=%u", 1);
+ virBufferAsprintf(&buf, ",threads=%u", 1);
}
}
+ if (def->vcpus != def->maxvcpus) {
@@ -425,20 +425,20 @@ index 5ffc3c8..456b477 100644
*/
char *
@@ -5666,7 +5667,7 @@ xenDaemonFormatSxpr(virConnectPtr conn,
- virBufferVSprintf(&buf, "(name '%s')", def->name);
- virBufferVSprintf(&buf, "(memory %lu)(maxmem %lu)",
+ virBufferAsprintf(&buf, "(name '%s')", def->name);
+ virBufferAsprintf(&buf, "(memory %lu)(maxmem %lu)",
def->mem.cur_balloon/1024, def->mem.max_balloon/1024);
-- virBufferVSprintf(&buf, "(vcpus %lu)", def->vcpus);
-+ virBufferVSprintf(&buf, "(vcpus %u)", def->maxvcpus);
+- virBufferAsprintf(&buf, "(vcpus %lu)", def->vcpus);
++ virBufferAsprintf(&buf, "(vcpus %u)", def->maxvcpus);
if (def->cpumask) {
char *ranges = virDomainCpuSetFormat(def->cpumask, def->cpumasklen);
@@ -5761,7 +5762,7 @@ xenDaemonFormatSxpr(virConnectPtr conn,
else
- virBufferVSprintf(&buf, "(kernel '%s')", def->os.loader);
+ virBufferAsprintf(&buf, "(kernel '%s')", def->os.loader);
-- virBufferVSprintf(&buf, "(vcpus %lu)", def->vcpus);
-+ virBufferVSprintf(&buf, "(vcpus %u)", def->maxvcpus);
+- virBufferAsprintf(&buf, "(vcpus %lu)", def->vcpus);
++ virBufferAsprintf(&buf, "(vcpus %u)", def->maxvcpus);
for (i = 0 ; i < def->os.nBootDevs ; i++) {
switch (def->os.bootDevs[i]) {
diff --git a/docs/api_extension/0010-improve-vcpu-support-in-qemu-command-line.patch b/docs/api_extension/0010-improve-vcpu-support-in-qemu-command-line.patch
index e0829918a..02320bb9f 100644
--- a/docs/api_extension/0010-improve-vcpu-support-in-qemu-command-line.patch
+++ b/docs/api_extension/0010-improve-vcpu-support-in-qemu-command-line.patch
@@ -23,17 +23,17 @@ index 38c8351..ffe184b 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -3714,6 +3714,8 @@ qemuBuildSmpArgStr(const virDomainDefPtr def,
- virBufferVSprintf(&buf, "%u", def->vcpus);
+ virBufferAsprintf(&buf, "%u", def->vcpus);
if ((qemuCmdFlags & QEMUD_CMD_FLAG_SMP_TOPOLOGY)) {
+ if (def->vcpus != def->maxvcpus)
-+ virBufferVSprintf(&buf, ",maxcpus=%u", def->maxvcpus);
++ virBufferAsprintf(&buf, ",maxcpus=%u", def->maxvcpus);
/* sockets, cores, and threads are either all zero
* or all non-zero, thus checking one of them is enough */
if (def->cpu && def->cpu->sockets) {
@@ -3726,12 +3728,12 @@ qemuBuildSmpArgStr(const virDomainDefPtr def,
- virBufferVSprintf(&buf, ",cores=%u", 1);
- virBufferVSprintf(&buf, ",threads=%u", 1);
+ virBufferAsprintf(&buf, ",cores=%u", 1);
+ virBufferAsprintf(&buf, ",threads=%u", 1);
}
- }
- if (def->vcpus != def->maxvcpus) {
diff --git a/docs/api_extension/0012-improve-vcpu-support-in-xen-command-line.patch b/docs/api_extension/0012-improve-vcpu-support-in-xen-command-line.patch
index f8764b326..0a7b2fccf 100644
--- a/docs/api_extension/0012-improve-vcpu-support-in-xen-command-line.patch
+++ b/docs/api_extension/0012-improve-vcpu-support-in-xen-command-line.patch
@@ -88,21 +88,21 @@ index 456b477..dfc6415 100644
}
@@ -5668,6 +5675,9 @@ xenDaemonFormatSxpr(virConnectPtr conn,
- virBufferVSprintf(&buf, "(memory %lu)(maxmem %lu)",
+ virBufferAsprintf(&buf, "(memory %lu)(maxmem %lu)",
def->mem.cur_balloon/1024, def->mem.max_balloon/1024);
- virBufferVSprintf(&buf, "(vcpus %u)", def->maxvcpus);
+ virBufferAsprintf(&buf, "(vcpus %u)", def->maxvcpus);
+ /* Computing the vcpu_avail bitmask works because MAX_VIRT_CPUS is 32. */
+ if (def->vcpus < def->maxvcpus)
-+ virBufferVSprintf(&buf, "(vcpu_avail %u)", (1U << def->vcpus) - 1);
++ virBufferAsprintf(&buf, "(vcpu_avail %u)", (1U << def->vcpus) - 1);
if (def->cpumask) {
char *ranges = virDomainCpuSetFormat(def->cpumask, def->cpumasklen);
@@ -5763,6 +5773,9 @@ xenDaemonFormatSxpr(virConnectPtr conn,
- virBufferVSprintf(&buf, "(kernel '%s')", def->os.loader);
+ virBufferAsprintf(&buf, "(kernel '%s')", def->os.loader);
- virBufferVSprintf(&buf, "(vcpus %u)", def->maxvcpus);
+ virBufferAsprintf(&buf, "(vcpus %u)", def->maxvcpus);
+ if (def->vcpus < def->maxvcpus)
-+ virBufferVSprintf(&buf, "(vcpu_avail %u)",
++ virBufferAsprintf(&buf, "(vcpu_avail %u)",
+ (1U << def->vcpus) - 1);
for (i = 0 ; i < def->os.nBootDevs ; i++) {
diff --git a/docs/hacking.html.in b/docs/hacking.html.in
index dd8eeb8fc..68886878e 100644
--- a/docs/hacking.html.in
+++ b/docs/hacking.html.in
@@ -654,7 +654,7 @@
...
virBufferAddLit(&amp;buf, "&lt;domain&gt;\n");
- virBufferVSprintf(&amp;buf, " &lt;memory&gt;%d&lt;/memory&gt;\n", memory);
+ virBufferAsprintf(&amp;buf, " &lt;memory&gt;%d&lt;/memory&gt;\n", memory);
...
virBufferAddLit(&amp;buf, "&lt;/domain&gt;\n");
diff --git a/docs/news.html.in b/docs/news.html.in
index 57b7fb567..fc18f621c 100644
--- a/docs/news.html.in
+++ b/docs/news.html.in
@@ -1098,7 +1098,7 @@ and check the <a href="http://libvirt.org/git/?p=libvirt.git;a=log">GIT log</a>
</li>
<li> Documentation:<br/>
updated c# bindings with arnauds latest changes (Justin Clift),<br/>
- Fix spelling of virBufferVSprintf (Jiri Denemark),<br/>
+ Fix spelling of virBufferAsprintf (Jiri Denemark),<br/>
Fix broken XML entity for '&gt;' (Philipp Hahn),<br/>
removed outdated reference to virt-mem (Justin Clift),<br/>
Add doc for missed options of migrate (Osier Yang),<br/>
@@ -2806,7 +2806,7 @@ and check the <a href="http://libvirt.org/git/?p=libvirt.git;a=log">GIT log</a>
virsh.c: avoid all leaks in OOM path in cmdCPUBaseline (Jiri Denemark),<br/>
Fixed reference count in virsh pool-build command (David Allan),<br/>
Fix daemon-conf invalid failures (David Allan),<br/>
- virBufferVSprintf: do not omit va_end(argptr) call (Jim Meyering),<br/>
+ virBufferAsprintf: do not omit va_end(argptr) call (Jim Meyering),<br/>
xend_internal.c: don't dereference NULL for unexpected input (Jim Meyering),<br/>
virsh: be careful to return "FALSE" upon OOM (Jim Meyering),<br/>
virBufferStrcat: do not skip va_end (Jim Meyering),<br/>