]> git.proxmox.com Git - mirror_lxcfs.git/blobdiff - bindings.c
enable debug option
[mirror_lxcfs.git] / bindings.c
index 3aaf5f9f93a7a63869838cabc2931f31eef23c0e..1442b9a52365dd32ca168b29bbac7dd2a2992ee1 100644 (file)
@@ -3606,7 +3606,7 @@ static uint64_t get_reaper_btime(pid)
 
        uptime = (uint64_t)time(NULL) - (uint64_t)sys.uptime;
        procstart = get_reaper_start_time_in_sec(pid);
-       return uptime - procstart;
+       return uptime + procstart;
 }
 
 #define CPUALL_MAX_SIZE (BUF_RESERVE_SIZE / 2)
@@ -3672,10 +3672,7 @@ static int proc_stat_read(char *buf, size_t size, off_t offset,
                        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 %"PRIu64"\n", get_reaper_btime(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;