]>
Commit | Line | Data |
---|---|---|
3bc99fae WB |
1 | From b882da1d3539231b7ca84814980303c33cad9c7f Mon Sep 17 00:00:00 2001 |
2 | From: Serge Hallyn <serge@hallyn.com> | |
3 | Date: Sun, 18 Jun 2017 14:43:22 -0500 | |
4 | Subject: [PATCH lxcfs 3/4] (temporarily?) revert the virtualization of btime | |
5 | field in /proc/stat | |
6 | ||
7 | Closes #189 | |
8 | ||
9 | This seems to be responsible for corrupting STIME on processlist | |
10 | inside containers. Hopefully we can find a reasonable way to fix | |
11 | both, but compared to unvirtualized btime field, bogus STIME field | |
12 | is the greater evil here. | |
13 | ||
14 | Signed-off-by: Serge Hallyn <serge@hallyn.com> | |
15 | --- | |
16 | bindings.c | 5 +---- | |
17 | 1 file changed, 1 insertion(+), 4 deletions(-) | |
18 | ||
19 | diff --git a/bindings.c b/bindings.c | |
20 | index 62fc5df..9aa884a 100644 | |
21 | --- a/bindings.c | |
22 | +++ b/bindings.c | |
23 | @@ -3672,10 +3672,7 @@ static int proc_stat_read(char *buf, size_t size, off_t offset, | |
24 | continue; | |
25 | if (sscanf(line, "cpu%9[^ ]", cpu_char) != 1) { | |
26 | /* not a ^cpuN line containing a number N, just print it */ | |
27 | - if (strncmp(line, "btime", 5) == 0) | |
28 | - l = snprintf(cache, cache_size, "btime %"PRIu64"\n", get_reaper_btime(fc->pid)); | |
29 | - else | |
30 | - l = snprintf(cache, cache_size, "%s", line); | |
31 | + l = snprintf(cache, cache_size, "%s", line); | |
32 | if (l < 0) { | |
33 | perror("Error writing to cache"); | |
34 | rv = 0; | |
35 | -- | |
36 | 2.11.0 | |
37 |