[PATCH 0/6] Introduce VIR_AUTOCLOSE macro for closing fd automatically

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This series introduce VIR_AUTOCLOSE macro which can force close fd of the file
automatically when the fd goes out of scope. It's used to eliminate VIR_FORCE_CLOSE
in cleanup sections. The new macro consults VIR_AUTOFREE and VIR_AUTOPTR.

Shi Lei (6):
  util: file: introduce VIR_AUTOCLOSE macro to close fd of the file
    automatically
  util: file: use VIR_AUTOCLOSE instead of VIR_FORCE_CLOSE in cleanup
    sections
  util: netdevbridge: use VIR_AUTOCLOSE instead of VIR_FORCE_CLOSE in
    cleanup sections
  util: netdev: use VIR_AUTOCLOSE instead of VIR_FORCE_CLOSE in cleanup
    sections
  phyp: driver: use VIR_AUTOCLOSE instead of VIR_FORCE_CLOSE in cleanup
    sections
  uml: conf: use VIR_AUTOCLOSE instead of VIR_FORCE_CLOSE in cleanup
    sections

 src/phyp/phyp_driver.c     |  29 ++---
 src/uml/uml_conf.c         |  13 +-
 src/util/virfile.c         |  21 +--
 src/util/virfile.h         |  20 ++-
 src/util/virnetdev.c       | 253 +++++++++++++------------------------
 src/util/virnetdevbridge.c | 120 ++++++------------
 6 files changed, 163 insertions(+), 293 deletions(-)

-- 
2.17.1


--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux