]> git.ipfire.org Git - thirdparty/libvirt.git/commit
nodeinfo: make freebsdNodeGetCPUCount work on Mac OS X
authorRyota Ozaki <ozaki.ryota@gmail.com>
Sat, 5 Oct 2013 05:56:37 +0000 (14:56 +0900)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 7 Oct 2013 08:28:18 +0000 (10:28 +0200)
commit2d74822a9eb4856c7f5216bb92bcb76630660f72
tree81b349c3761a00b019cfd004450717c7404dcca6
parent5a468b38b6b9ac66c1db5d8ed5d5a122a9cf01cd
nodeinfo: make freebsdNodeGetCPUCount work on Mac OS X

This fixes the following error:
  error : nodeGetInfo:933 : this function is not supported
  by the connection driver: node info not implemented on this platform

The freebsdNodeGetCPUCount was renamed to appleFreebsdNodeGetCPUCount
in order to make more visible the fact, that it works on Mac OS X too.

Mac OS X can use sysctlbyname as same as FreeBSD to get the CPU
frequency. However, the MIB style name is different from FreeBSD's.
And the unit of the return frequency is also different.

Signed-off-by: Ryota Ozaki <ozaki.ryota@gmail.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/nodeinfo.c