[PATCH 18/24] locking.html.in: Kill useless spaces in <pre/>

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 docs/internals/locking.html.in | 132 ++++++++++++++++++++---------------------
 1 file changed, 66 insertions(+), 66 deletions(-)

diff --git a/docs/internals/locking.html.in b/docs/internals/locking.html.in
index 0317c78..09cc2ba 100644
--- a/docs/internals/locking.html.in
+++ b/docs/internals/locking.html.in
@@ -122,7 +122,7 @@
     </p>
 
     <pre>
-      #include &lt;libvirt/plugins/lock_manager.h&gt;
+#include &lt;libvirt/plugins/lock_manager.h&gt;
     </pre>
 
     <p>
@@ -141,7 +141,7 @@
     </p>
 
     <pre>
-      lockManager="sanlock"
+lockManager="sanlock"
     </pre>
 
     <p>
@@ -169,40 +169,40 @@
     </p>
 
     <pre>
-      virLockManagerParam params[] = {
-        { .type = VIR_LOCK_MANAGER_PARAM_TYPE_UUID,
-          .key = "uuid",
-        },
-        { .type = VIR_LOCK_MANAGER_PARAM_TYPE_STRING,
-          .key = "name",
-          .value = { .str = dom->def->name },
-        },
-        { .type = VIR_LOCK_MANAGER_PARAM_TYPE_UINT,
-          .key = "id",
-          .value = { .i = dom->def->id },
-        },
-        { .type = VIR_LOCK_MANAGER_PARAM_TYPE_UINT,
-          .key = "pid",
-          .value = { .i = dom->pid },
-        },
-        { .type = VIR_LOCK_MANAGER_PARAM_TYPE_CSTRING,
-          .key = "uri",
-          .value = { .cstr = driver->uri },
-        },
-      };
-      mgr = virLockManagerNew(lockPlugin,
-                              VIR_LOCK_MANAGER_TYPE_DOMAIN,
-                              ARRAY_CARDINALITY(params),
-                              params,
-                              0)));
+virLockManagerParam params[] = {
+  { .type = VIR_LOCK_MANAGER_PARAM_TYPE_UUID,
+    .key = "uuid",
+  },
+  { .type = VIR_LOCK_MANAGER_PARAM_TYPE_STRING,
+    .key = "name",
+    .value = { .str = dom->def->name },
+  },
+  { .type = VIR_LOCK_MANAGER_PARAM_TYPE_UINT,
+    .key = "id",
+    .value = { .i = dom->def->id },
+  },
+  { .type = VIR_LOCK_MANAGER_PARAM_TYPE_UINT,
+    .key = "pid",
+    .value = { .i = dom->pid },
+  },
+  { .type = VIR_LOCK_MANAGER_PARAM_TYPE_CSTRING,
+    .key = "uri",
+    .value = { .cstr = driver->uri },
+  },
+};
+mgr = virLockManagerNew(lockPlugin,
+                        VIR_LOCK_MANAGER_TYPE_DOMAIN,
+                        ARRAY_CARDINALITY(params),
+                        params,
+                        0)));
 
-      foreach (initial disks)
-          virLockManagerAddResource(mgr,
-                                    VIR_LOCK_MANAGER_RESOURCE_TYPE_DISK,
-                                    $path, 0, NULL, $flags);
+foreach (initial disks)
+    virLockManagerAddResource(mgr,
+                              VIR_LOCK_MANAGER_RESOURCE_TYPE_DISK,
+                              $path, 0, NULL, $flags);
 
-      if (virLockManagerAcquire(lock, NULL, 0) &lt; 0);
-        ...abort...
+if (virLockManagerAcquire(lock, NULL, 0) &lt; 0);
+  ...abort...
     </pre>
 
     <h3><a name="usageLockAttach">Lock release</a></h3>
@@ -214,40 +214,40 @@
     </p>
 
     <pre>
-      char *state = NULL;
-      virLockManagerParam params[] = {
-        { .type = VIR_LOCK_MANAGER_PARAM_TYPE_UUID,
-          .key = "uuid",
-        },
-        { .type = VIR_LOCK_MANAGER_PARAM_TYPE_STRING,
-          .key = "name",
-          .value = { .str = dom->def->name },
-        },
-        { .type = VIR_LOCK_MANAGER_PARAM_TYPE_UINT,
-          .key = "id",
-          .value = { .i = dom->def->id },
-        },
-        { .type = VIR_LOCK_MANAGER_PARAM_TYPE_UINT,
-          .key = "pid",
-          .value = { .i = dom->pid },
-        },
-        { .type = VIR_LOCK_MANAGER_PARAM_TYPE_CSTRING,
-          .key = "uri",
-          .value = { .cstr = driver->uri },
-        },
-      };
-      mgr = virLockManagerNew(lockPlugin,
-                              VIR_LOCK_MANAGER_TYPE_DOMAIN,
-                              ARRAY_CARDINALITY(params),
-                              params,
-                              0)));
+char *state = NULL;
+virLockManagerParam params[] = {
+  { .type = VIR_LOCK_MANAGER_PARAM_TYPE_UUID,
+    .key = "uuid",
+  },
+  { .type = VIR_LOCK_MANAGER_PARAM_TYPE_STRING,
+    .key = "name",
+    .value = { .str = dom->def->name },
+  },
+  { .type = VIR_LOCK_MANAGER_PARAM_TYPE_UINT,
+    .key = "id",
+    .value = { .i = dom->def->id },
+  },
+  { .type = VIR_LOCK_MANAGER_PARAM_TYPE_UINT,
+    .key = "pid",
+    .value = { .i = dom->pid },
+  },
+  { .type = VIR_LOCK_MANAGER_PARAM_TYPE_CSTRING,
+    .key = "uri",
+    .value = { .cstr = driver->uri },
+  },
+};
+mgr = virLockManagerNew(lockPlugin,
+                        VIR_LOCK_MANAGER_TYPE_DOMAIN,
+                        ARRAY_CARDINALITY(params),
+                        params,
+                        0)));
 
-      foreach (initial disks)
-          virLockManagerAddResource(mgr,
-                                    VIR_LOCK_MANAGER_RESOURCE_TYPE_DISK,
-                                    $path, 0, NULL, $flags);
+foreach (initial disks)
+    virLockManagerAddResource(mgr,
+                              VIR_LOCK_MANAGER_RESOURCE_TYPE_DISK,
+                              $path, 0, NULL, $flags);
 
-      virLockManagerRelease(mgr, &amp; state, 0);
+virLockManagerRelease(mgr, &amp; state, 0);
     </pre>
 
     <p>
-- 
2.8.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]