]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: Adjust error paths for virNumaSetPagePoolSize
authorLuyao Huang <lhuang@redhat.com>
Wed, 21 Oct 2015 04:13:40 +0000 (12:13 +0800)
committerJohn Ferlan <jferlan@redhat.com>
Wed, 21 Oct 2015 20:19:42 +0000 (16:19 -0400)
commite802d7efb4c0809a5fc756048dc34b2d15b7618d
tree79f42e5290f17dc6d5c213ed75727b80c161143a
parentdeb8c66d448810ae5bc0d8211328fa0e976a037a
util: Adjust error paths for virNumaSetPagePoolSize

Commit id '1c24cfe9' added new checks and error messaes for failure
scenarios. Let's adjust those error messages to after the call to
virNumaGetHugePageInfoPath in order to provide a more specific error
message depending on node and page_size

After this patch:
 # virsh allocpages --pagesize 2047 --pagecount 1 --cellno 0
 error: operation failed: page size 2047 is not available on node 0

 # virsh allocpages --pagesize 2047 --pagecount 1
 error: operation failed: page size 2047 is not available

Signed-off-by: Luyao Huang <lhuang@redhat.com>
src/util/virnuma.c