|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH for-4.6 2/3] xen: replace non-POSIX error codes
Some DOMCTLs returned non-POSIX error codes, replace them with POSIX
compilant values instead. EBADRQC and EBADSLT are replaced by EINVAL, while
EUSERS is replaced with EOVERFLOW.
Signed-off-by: Roger Pau Monnà <roger.pau@xxxxxxxxxx>
Cc: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
Cc: Jan Beulich <jbeulich@xxxxxxxx>
Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
Nothing in libxc or libxl seems to check for those specific error codes, so
I guess it's fine to replace them with whatever we want.
---
xen/arch/x86/mm/paging.c | 2 +-
xen/common/domain.c | 4 ++--
xen/common/hvm/save.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/xen/arch/x86/mm/paging.c b/xen/arch/x86/mm/paging.c
index 7089155..1c3504d 100644
--- a/xen/arch/x86/mm/paging.c
+++ b/xen/arch/x86/mm/paging.c
@@ -766,7 +766,7 @@ long
paging_domctl_continuation(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl)
if ( op.interface_version != XEN_DOMCTL_INTERFACE_VERSION ||
op.cmd != XEN_DOMCTL_shadow_op )
- return -EBADRQC;
+ return -EINVAL;
d = rcu_lock_domain_by_id(op.domain);
if ( d == NULL )
diff --git a/xen/common/domain.c b/xen/common/domain.c
index 8efef5c..791166b 100644
--- a/xen/common/domain.c
+++ b/xen/common/domain.c
@@ -900,7 +900,7 @@ int vcpu_pause_by_systemcontroller(struct vcpu *v)
new = old + 1;
if ( new > 255 )
- return -EUSERS;
+ return -EOVERFLOW;
prev = cmpxchg(&v->controller_pause_count, old, new);
} while ( prev != old );
@@ -980,7 +980,7 @@ int __domain_pause_by_systemcontroller(struct domain *d,
* toolstack overflowing d->pause_count with many repeated hypercalls.
*/
if ( new > 255 )
- return -EUSERS;
+ return -EOVERFLOW;
prev = cmpxchg(&d->controller_pause_count, old, new);
} while ( prev != old );
diff --git a/xen/common/hvm/save.c b/xen/common/hvm/save.c
index da6e668..db85fee 100644
--- a/xen/common/hvm/save.c
+++ b/xen/common/hvm/save.c
@@ -114,7 +114,7 @@ int hvm_save_one(struct domain *d, uint16_t typecode,
uint16_t instance,
uint32_t off;
const struct hvm_save_descriptor *desc;
- rv = -EBADSLT;
+ rv = -EINVAL;
for ( off = 0; off < (ctxt.cur - sizeof(*desc)); off += desc->length )
{
desc = (void *)(ctxt.data + off);
--
1.9.5 (Apple Git-50.3)
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |