mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
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 EDOM, while EUSERS is replaced with EOVERFLOW. Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Replace two EDOM uses. Reviewed-by: Jan Beulich <jbeulich@suse.com> Acked-by: George Dunlap <george.dunlap@eu.citrix.com> Release-acked-by: Wei Liu <wei.liu2@citrix.com>
This commit is contained in:
1 parent
21a85ed569
commit
e919fb2ac3
3 files changed
+4
-4
No files matched your search
@@ -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 -EOPNOTSUPP;
|
||||
|
||||
d = rcu_lock_domain_by_id(op.domain);
|
||||
if ( d == NULL )
|
||||
|
||||
+2
-2
@@ -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 );
|
||||
|
||||
@@ -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 = -ENOENT;
|
||||
for ( off = 0; off < (ctxt.cur - sizeof(*desc)); off += desc->length )
|
||||
{
|
||||
desc = (void *)(ctxt.data + off);
|
||||
|
||||