1. 24 10月, 2019 1 次提交
    • M
      Drop needless ret variable · 3b4df5d3
      Michal Privoznik 提交于
      In few places we have the following code pattern:
      
        int ret;
        ... /* @ret is not accessed here */
        ret = f(...);
        return ret;
      
      This pattern can be written less verbose:
      
        ...
        return f(...);
      
      This patch was generated with following coccinelle spatch:
      
        @@
        type T;
        constant C;
        expression f;
        identifier ret;
        @@
        -T ret = C;
         ... when != ret
        -ret = f;
        -return ret;
        +return f;
      
      Afterwards I needed to fix a few places, e.g. comment in
      virDomainNetIPParseXML() was removed too because coccinelle
      thinks it refers to @ret while in fact it doesn't. Also in few
      places it replaced @ret declaration with a few spaces instead of
      removing the line. But nothing terribly wrong.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
      3b4df5d3
  2. 21 10月, 2019 2 次提交
  3. 16 10月, 2019 3 次提交
  4. 15 10月, 2019 2 次提交
  5. 14 10月, 2019 1 次提交
  6. 08 10月, 2019 1 次提交
  7. 27 9月, 2019 2 次提交
  8. 14 9月, 2019 3 次提交
  9. 27 8月, 2019 1 次提交
  10. 21 8月, 2019 5 次提交
  11. 16 8月, 2019 2 次提交
  12. 09 8月, 2019 1 次提交
  13. 08 8月, 2019 1 次提交
  14. 18 7月, 2019 4 次提交
  15. 11 7月, 2019 1 次提交
    • D
      network: acquire a pidfile in the driver root directory · c03aef7c
      Daniel P. Berrangé 提交于
      When we allow multiple instances of the driver for the same user
      account, using a separate root directory, we need to ensure mutual
      exclusion. Use a pidfile to guarantee this.
      
      In privileged libvirtd this ends up locking
      
         /var/run/libvirt/network/driver.pid
      
      In unprivileged libvirtd this ends up locking
      
        /run/user/$UID/libvirt/network/run/driver.pid
      
      NB, the latter can vary depending on $XDG_RUNTIME_DIR
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      c03aef7c
  16. 26 6月, 2019 1 次提交
    • D
      network: avoid including sys/sysctl.h on Linux · 3338c40b
      Daniel P. Berrangé 提交于
      The sys/sysctl.h header is only needed on BSD platforms to get
      the sysctlbyname() function declaration. On Linux we talk to
      procfs instead to change sysctls.
      
      Unfortunately a legacy sys/sysctl.h header does exist on Linux
      and including it has recently started triggering a deprecation
      warning from glibc.
      
      Protect its inclusion with a HAVE_SYSCTLBYNAME check instead
      so that it only gets used on platforms where we need that
      function declaration.
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      3338c40b
  17. 17 6月, 2019 9 次提交