xen: fix usage of ENODATA
commit74bc41511af5c389cd9f37956bd6e7fd7de35c49
authorRoger Pau Monne <roger.pau@citrix.com>
Fri, 23 May 2014 15:57:47 +0000 (23 17:57 +0200)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Fri, 1 Aug 2014 15:57:28 +0000 (1 15:57 +0000)
tree3ac3141be2dad8be31e92eb75dce281cdd5a314f
parent541bbb07eb197a870661ed702ae1f15c7d46aea6
xen: fix usage of ENODATA

ENODATA doesn't exist on FreeBSD, so ENODATA errors returned by the
hypervisor are translated to ENOENT.

Also, the error code is returned in errno if the call returns -1, so
compare the error code with the value in errno instead of the value
returned by the function.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: xen-devel@lists.xenproject.org
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Anthony Perard <anthony.perard@citrix.com>
xen-hvm.c