network: Fix upgrade from libvirt older than 1.2.4
Starting from libvirt-1.2.4, network state XML files moved to another directory (see commit b9e95491) and libvirt automatically migrates the network state files to a new location. However, the code used dirent.d_type which is not supported by all filesystems. Thus, when libvirt was upgraded on a host which used such filesystem, network state XMLs were not properly moved and running networks disappeared from libvirt. This patch falls back to lstat() whenever dirent.d_type is DT_UNKNOWN to fix this issue. https://bugzilla.redhat.com/show_bug.cgi?id=1167145Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
Showing
想要评论请 注册 或 登录