[PATCH 1/3] virnuma: Add some more comments

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

 



Especially add comments to mark ifdef, else and endif sections.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 src/util/virnuma.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/util/virnuma.c b/src/util/virnuma.c
index 89435de..ee1c4af 100644
--- a/src/util/virnuma.c
+++ b/src/util/virnuma.c
@@ -74,7 +74,7 @@ virNumaGetAutoPlacementAdvice(unsigned short vcpus,
     virCommandFree(cmd);
     return output;
 }
-#else
+#else /* !HAVE_NUMAD */
 char *
 virNumaGetAutoPlacementAdvice(unsigned short vcpus ATTRIBUTE_UNUSED,
                               unsigned long long balloon ATTRIBUTE_UNUSED)
@@ -83,7 +83,7 @@ virNumaGetAutoPlacementAdvice(unsigned short vcpus ATTRIBUTE_UNUSED,
                    _("numad is not available on this host"));
     return NULL;
 }
-#endif
+#endif /* !HAVE_NUMAD */
 
 #if WITH_NUMACTL
 int
@@ -339,7 +339,8 @@ virNumaGetNodeCPUs(int node,
 # undef MASK_CPU_ISSET
 # undef n_bits
 
-#else
+#else /* !WITH_NUMACTL */
+
 int
 virNumaSetupMemoryPolicy(virDomainNumatunePtr numatune,
                          virBitmapPtr nodemask ATTRIBUTE_UNUSED)
@@ -404,8 +405,7 @@ virNumaGetNodeCPUs(int node ATTRIBUTE_UNUSED,
                    _("NUMA isn't available on this host"));
     return -1;
 }
-#endif
-
+#endif /* !WITH_NUMACTL */
 
 /**
  * virNumaGetMaxCPUs:
@@ -494,8 +494,8 @@ virNumaGetDistances(int node,
     return ret;
 }
 
+#else /* !(WITH_NUMACTL && HAVE_NUMA_BITMASK_ISBITSET) */
 
-#else
 bool
 virNumaNodeIsAvailable(int node)
 {
@@ -519,7 +519,7 @@ virNumaGetDistances(int node ATTRIBUTE_UNUSED,
     VIR_DEBUG("NUMA distance information isn't available on this host");
     return 0;
 }
-#endif
+#endif /* !(WITH_NUMACTL && HAVE_NUMA_BITMASK_ISBITSET) */
 
 
 /* currently all the huge page stuff below is linux only */
-- 
2.0.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]