[libvirt PATCH] cgroup: add stub for virCgroupNew

Ján Tomko posted 1 patch 1 week, 4 days ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/0a8d5614335efa71622c0f5f40dc33c028350966.1605781914.git.jtomko@redhat.com
src/util/vircgroup.c | 11 +++++++++++
1 file changed, 11 insertions(+)

[libvirt PATCH] cgroup: add stub for virCgroupNew

Posted by Ján Tomko 1 week, 4 days ago
The previous commit exported the function but forgot to add
a non-Linux stub.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Fixes: 126cb34a206a44f04e364700b46426dff9f387d5
---
Pushed.

 src/util/vircgroup.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
index e0fe1dbf3e..13df10e507 100644
--- a/src/util/vircgroup.c
+++ b/src/util/vircgroup.c
@@ -2820,6 +2820,17 @@ virCgroupNewPartition(const char *path G_GNUC_UNUSED,
 }
 
 
+int
+virCgroupNew(const char *path G_GNUC_UNUSED,
+             int controllers G_GNUC_UNUSED,
+             virCgroupPtr *group G_GNUC_UNUSED)
+{
+    virReportSystemError(ENXIO, "%s",
+                         _("Control groups not supported on this platform"));
+    return -1;
+}
+
+
 int
 virCgroupNewSelf(virCgroupPtr *group G_GNUC_UNUSED)
 {
-- 
2.26.2