1. 05 6月, 2015 9 次提交
  2. 04 6月, 2015 29 次提交
  3. 03 6月, 2015 2 次提交
    • P
      util: process: Refactor and fix virProcessSetAffinity · 825df8c3
      Peter Krempa 提交于
      Refactor the function to return the bitmap instead of an integer and the
      inner workings so that they make more sense.
      
      This patch also fixes possible segfault on old systems that was
      introduced by commit:
      
      commit f1a43a8e
      Author: Hu Tao <hutao@cn.fujitsu.com>
      Date:   Fri Sep 14 15:46:59 2012 +0800
      
          use virBitmap to store cpu affinity info
      825df8c3
    • M
      util: Clear output broadcast address before filling it in · 99cc11b9
      Martin Kletzander 提交于
      Since commit 55ace7c4, the sockettest
      fails without VIR_TEST_DEBUG set.  The problem is found by test number
      42 (co-incidence?), which tests range '192.168.122.1' -
      '192.168.122.255' in network '192.168.122.0/24'.  That is supposed to
      fail because the end address is equal to the broadcast address.
      
      When comparing these two in 'virSocketAddrEqual(end, &broadcast)',
      there is a check for sin_addr as well as for sin_port.  That port,
      however, is different when we do not enable test debugging.  With the
      testing enabled, the port is 0 (correctly initialized), but without that
      it has a random number there.  And that's because the structure is not
      initialized anywhere.
      
      By zeroing the structure before filling in the info, we make sure we
      return only the address and not any information that was not requested.
      And the test work once again.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      99cc11b9