From 72dd97f7ecfa1e118f4b33b3d694694fcf6fd120 Mon Sep 17 00:00:00 2001
From: Serge Hallyn <serge@hallyn.com>
Date: Sun, 18 Jun 2017 14:43:22 -0500
Subject: [PATCH 1/2] (temporarily?) revert the virtualization of btime field
 in /proc/stat

Closes #189

This seems to be responsible for corrupting STIME on processlist
inside containers.  Hopefully we can find a reasonable way to fix
both, but compared to unvirtualized btime field, bogus STIME field
is the greater evil here.

Signed-off-by: Serge Hallyn <serge@hallyn.com>
---
 bindings.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Index: lxcfs-2.0.7/bindings.c
===================================================================
--- lxcfs-2.0.7.orig/bindings.c
+++ lxcfs-2.0.7/bindings.c
@@ -3538,10 +3538,7 @@ static int proc_stat_read(char *buf, siz
 			continue;
 		if (sscanf(line, "cpu%9[^ ]", cpu_char) != 1) {
 			/* not a ^cpuN line containing a number N, just print it */
-			if (strncmp(line, "btime", 5) == 0)
-				l = snprintf(cache, cache_size, "btime %ld\n", getreaperctime(fc->pid));
-			else
-				l = snprintf(cache, cache_size, "%s", line);
+			l = snprintf(cache, cache_size, "%s", line);
 			if (l < 0) {
 				perror("Error writing to cache");
 				rv = 0;
