[lxc-devel] [lxd/master] console: use correct logic

brauner on Github lxc-bot at linuxcontainers.org
Thu Jan 11 12:46:02 UTC 2018


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 364 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20180111/d71a0b9a/attachment.bin>
-------------- next part --------------
From 77903ffdc239fb1f412545b8c2b15ead0d0554c0 Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brauner at ubuntu.com>
Date: Thu, 11 Jan 2018 13:45:33 +0100
Subject: [PATCH] console: use correct logic

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>
---
 lxd/container_console.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lxd/container_console.go b/lxd/container_console.go
index 07ef18b4f..551519ed5 100644
--- a/lxd/container_console.go
+++ b/lxd/container_console.go
@@ -326,7 +326,7 @@ func containerConsoleLogGet(d *Daemon, r *http.Request) Response {
 		return SmartError(err)
 	}
 
-	if util.RuntimeLiblxcVersionAtLeast(3, 0, 0) {
+	if !util.RuntimeLiblxcVersionAtLeast(3, 0, 0) {
 		return BadRequest(fmt.Errorf("Querying the console buffer requires liblxc >= 3.0"))
 	}
 
@@ -373,7 +373,7 @@ func containerConsoleLogDelete(d *Daemon, r *http.Request) Response {
 		return SmartError(err)
 	}
 
-	if util.RuntimeLiblxcVersionAtLeast(3, 0, 0) {
+	if !util.RuntimeLiblxcVersionAtLeast(3, 0, 0) {
 		return BadRequest(fmt.Errorf("Clearing the console buffer requires liblxc >= 3.0"))
 	}
 


More information about the lxc-devel mailing list