• D
    Remove 'brControl' object · 6cfeb9a7
    Daniel P. Berrange 提交于
    The bridge management APIs in src/util/bridge.c require a brControl
    object to be passed around. This holds the file descriptor for the
    control socket. This extra object complicates use of the API for
    only a minor efficiency gain, which is in turn entirely offset by
    the need to fork/exec the brctl command for STP configuration.
    
    This patch removes the 'brControl' object entirely, instead opening
    the control socket & closing it again within the scope of each method.
    
    The parameter names for the APIs are also made to consistently use
    'brname' for bridge device name, and 'ifname' for an interface
    device name. Finally annotations are added for non-NULL parameters
    and return check validation
    
    * src/util/bridge.c, src/util/bridge.h: Remove brControl object
      and update API parameter names & annotations.
    * src/lxc/lxc_driver.c, src/network/bridge_driver.c,
      src/uml/uml_conf.h, src/uml/uml_conf.c, src/uml/uml_driver.c,
      src/qemu/qemu_command.c, src/qemu/qemu_conf.h,
      src/qemu/qemu_driver.c: Remove reference to 'brControl' object
    6cfeb9a7
uml_conf.c 15.2 KB