The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxcfs/pull/405

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
reset  read_pos=0 after building usage_str
From e05b2fffd9b69c9273348333d71cc6d6aed199bd Mon Sep 17 00:00:00 2001
From: Joseph Moore <joemoore1...@gmail.com>
Date: Wed, 6 May 2020 13:23:35 -0700
Subject: [PATCH] Fix https://github.com/lxc/lxcfs/issues/404

reset  read_pos=0 after building usage_str
---
 src/proc_cpuview.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/proc_cpuview.c b/src/proc_cpuview.c
index 5c21bc4..686072b 100644
--- a/src/proc_cpuview.c
+++ b/src/proc_cpuview.c
@@ -1061,6 +1061,7 @@ int read_cpuacct_usage_all(char *cg, char *cpuset,
                }
 
                usage_str = data;
+               read_pos = 0;
 
                lxcfs_v("usage_str: %s\n", usage_str);
        }
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to