]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
util: reduce syscalls for virGetDeviceID
authorEric Blake <eblake@redhat.com>
Wed, 9 Jan 2013 23:34:15 +0000 (16:34 -0700)
committerEric Blake <eblake@redhat.com>
Thu, 10 Jan 2013 17:57:29 +0000 (10:57 -0700)
commit9f2879d3113e1ef177941f52df868f926b37ce5b
treecbf974ddfaf5cecc079f8ed754f5516dea2ba3d6
parent66b46932691195214423286535e97049066cd0ca
util: reduce syscalls for virGetDeviceID

There's no need to do lots of readlink() calls to canonicalize
a name if we're only going to use stat() on it, since stat()
already chases symlinks.

* src/util/virutil.c (virGetDeviceID): Let stat() do the symlink
chasing.
src/util/virutil.c