1. 14 12月, 2018 2 次提交
  2. 15 11月, 2018 1 次提交
    • P
      util: Fix virCgroupGetMemoryStat · b8176d6e
      Peter Chubb 提交于
      Commit 901d2b9c introduced virCgroupGetMemoryStat and replaced
      the LXC virLXCCgroupGetMemStat logic in commit e634c7cd. However,
      in doing so the replacement wasn't exact as the LXC logic used
      getline() to process the cgroup controller data, while the new
      virCgroupGetMemoryStat used "memory.stat" manual buffer read/
      processing which neglected to forward through @line in order
      to read each line in the output.
      
      To fix that, we should be sure to carry forward the @line value
      for each line read updating it beyond that current @newLine value
      once we've calculated the values that we want.
      Signed-off-by: NPeter Chubb <peter.chubb@data61.csiro.au>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
      b8176d6e
  3. 27 9月, 2018 1 次提交
    • P
      vircgroupv1: fix build on non-linux OSes · 0615c843
      Pavel Hrdina 提交于
      Cgroups are linux specific and we need to make sure that the code is
      compiled only on linux.  On different OSes it fails the compilation:
      
      ../../src/util/vircgroupv1.c:65:19: error: variable has incomplete type 'struct mntent'
          struct mntent entry;
                        ^
      ../../src/util/vircgroupv1.c:65:12: note: forward declaration of 'struct mntent'
          struct mntent entry;
                 ^
      ../../src/util/vircgroupv1.c:74:12: error: implicit declaration of function 'getmntent_r' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
          while (getmntent_r(mounts, &entry, buf, sizeof(buf)) != NULL) {
                 ^
      ../../src/util/vircgroupv1.c:814:39: error: use of undeclared identifier 'MS_NOSUID'
          if (mount("tmpfs", root, "tmpfs", MS_NOSUID|MS_NODEV|MS_NOEXEC, opts) < 0) {
                                            ^
      ../../src/util/vircgroupv1.c:814:49: error: use of undeclared identifier 'MS_NODEV'
          if (mount("tmpfs", root, "tmpfs", MS_NOSUID|MS_NODEV|MS_NOEXEC, opts) < 0) {
                                                      ^
      ../../src/util/vircgroupv1.c:814:58: error: use of undeclared identifier 'MS_NOEXEC'
          if (mount("tmpfs", root, "tmpfs", MS_NOSUID|MS_NODEV|MS_NOEXEC, opts) < 0) {
                                                               ^
      ../../src/util/vircgroupv1.c:841:65: error: use of undeclared identifier 'MS_BIND'
                  if (mount(src, group->legacy[i].mountPoint, "none", MS_BIND,
                                                                      ^
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      0615c843
  4. 25 9月, 2018 36 次提交