mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-28 19:41:16 +00:00
locking.html.in: Kill useless spaces in <pre/>
The <pre/> section is rendered as-is on the page. That is, if all the lines are prefixed with 4 spaces the rendered page will also have them. Problem is if we put a box around such <pre/> because the content might not fix into it. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
e693c444af
commit
f639ab2a4f
@ -122,7 +122,7 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
#include <libvirt/plugins/lock_manager.h>
|
#include <libvirt/plugins/lock_manager.h>
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@ -141,7 +141,7 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
lockManager="sanlock"
|
lockManager="sanlock"
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@ -169,40 +169,40 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
virLockManagerParam params[] = {
|
virLockManagerParam params[] = {
|
||||||
{ .type = VIR_LOCK_MANAGER_PARAM_TYPE_UUID,
|
{ .type = VIR_LOCK_MANAGER_PARAM_TYPE_UUID,
|
||||||
.key = "uuid",
|
.key = "uuid",
|
||||||
},
|
},
|
||||||
{ .type = VIR_LOCK_MANAGER_PARAM_TYPE_STRING,
|
{ .type = VIR_LOCK_MANAGER_PARAM_TYPE_STRING,
|
||||||
.key = "name",
|
.key = "name",
|
||||||
.value = { .str = dom->def->name },
|
.value = { .str = dom->def->name },
|
||||||
},
|
},
|
||||||
{ .type = VIR_LOCK_MANAGER_PARAM_TYPE_UINT,
|
{ .type = VIR_LOCK_MANAGER_PARAM_TYPE_UINT,
|
||||||
.key = "id",
|
.key = "id",
|
||||||
.value = { .i = dom->def->id },
|
.value = { .i = dom->def->id },
|
||||||
},
|
},
|
||||||
{ .type = VIR_LOCK_MANAGER_PARAM_TYPE_UINT,
|
{ .type = VIR_LOCK_MANAGER_PARAM_TYPE_UINT,
|
||||||
.key = "pid",
|
.key = "pid",
|
||||||
.value = { .i = dom->pid },
|
.value = { .i = dom->pid },
|
||||||
},
|
},
|
||||||
{ .type = VIR_LOCK_MANAGER_PARAM_TYPE_CSTRING,
|
{ .type = VIR_LOCK_MANAGER_PARAM_TYPE_CSTRING,
|
||||||
.key = "uri",
|
.key = "uri",
|
||||||
.value = { .cstr = driver->uri },
|
.value = { .cstr = driver->uri },
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
mgr = virLockManagerNew(lockPlugin,
|
mgr = virLockManagerNew(lockPlugin,
|
||||||
VIR_LOCK_MANAGER_TYPE_DOMAIN,
|
VIR_LOCK_MANAGER_TYPE_DOMAIN,
|
||||||
ARRAY_CARDINALITY(params),
|
ARRAY_CARDINALITY(params),
|
||||||
params,
|
params,
|
||||||
0)));
|
0)));
|
||||||
|
|
||||||
foreach (initial disks)
|
foreach (initial disks)
|
||||||
virLockManagerAddResource(mgr,
|
virLockManagerAddResource(mgr,
|
||||||
VIR_LOCK_MANAGER_RESOURCE_TYPE_DISK,
|
VIR_LOCK_MANAGER_RESOURCE_TYPE_DISK,
|
||||||
$path, 0, NULL, $flags);
|
$path, 0, NULL, $flags);
|
||||||
|
|
||||||
if (virLockManagerAcquire(lock, NULL, 0) < 0);
|
if (virLockManagerAcquire(lock, NULL, 0) < 0);
|
||||||
...abort...
|
...abort...
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<h3><a name="usageLockAttach">Lock release</a></h3>
|
<h3><a name="usageLockAttach">Lock release</a></h3>
|
||||||
@ -214,40 +214,40 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
char *state = NULL;
|
char *state = NULL;
|
||||||
virLockManagerParam params[] = {
|
virLockManagerParam params[] = {
|
||||||
{ .type = VIR_LOCK_MANAGER_PARAM_TYPE_UUID,
|
{ .type = VIR_LOCK_MANAGER_PARAM_TYPE_UUID,
|
||||||
.key = "uuid",
|
.key = "uuid",
|
||||||
},
|
},
|
||||||
{ .type = VIR_LOCK_MANAGER_PARAM_TYPE_STRING,
|
{ .type = VIR_LOCK_MANAGER_PARAM_TYPE_STRING,
|
||||||
.key = "name",
|
.key = "name",
|
||||||
.value = { .str = dom->def->name },
|
.value = { .str = dom->def->name },
|
||||||
},
|
},
|
||||||
{ .type = VIR_LOCK_MANAGER_PARAM_TYPE_UINT,
|
{ .type = VIR_LOCK_MANAGER_PARAM_TYPE_UINT,
|
||||||
.key = "id",
|
.key = "id",
|
||||||
.value = { .i = dom->def->id },
|
.value = { .i = dom->def->id },
|
||||||
},
|
},
|
||||||
{ .type = VIR_LOCK_MANAGER_PARAM_TYPE_UINT,
|
{ .type = VIR_LOCK_MANAGER_PARAM_TYPE_UINT,
|
||||||
.key = "pid",
|
.key = "pid",
|
||||||
.value = { .i = dom->pid },
|
.value = { .i = dom->pid },
|
||||||
},
|
},
|
||||||
{ .type = VIR_LOCK_MANAGER_PARAM_TYPE_CSTRING,
|
{ .type = VIR_LOCK_MANAGER_PARAM_TYPE_CSTRING,
|
||||||
.key = "uri",
|
.key = "uri",
|
||||||
.value = { .cstr = driver->uri },
|
.value = { .cstr = driver->uri },
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
mgr = virLockManagerNew(lockPlugin,
|
mgr = virLockManagerNew(lockPlugin,
|
||||||
VIR_LOCK_MANAGER_TYPE_DOMAIN,
|
VIR_LOCK_MANAGER_TYPE_DOMAIN,
|
||||||
ARRAY_CARDINALITY(params),
|
ARRAY_CARDINALITY(params),
|
||||||
params,
|
params,
|
||||||
0)));
|
0)));
|
||||||
|
|
||||||
foreach (initial disks)
|
foreach (initial disks)
|
||||||
virLockManagerAddResource(mgr,
|
virLockManagerAddResource(mgr,
|
||||||
VIR_LOCK_MANAGER_RESOURCE_TYPE_DISK,
|
VIR_LOCK_MANAGER_RESOURCE_TYPE_DISK,
|
||||||
$path, 0, NULL, $flags);
|
$path, 0, NULL, $flags);
|
||||||
|
|
||||||
virLockManagerRelease(mgr, & state, 0);
|
virLockManagerRelease(mgr, & state, 0);
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
Loading…
Reference in New Issue
Block a user