aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/schedule.c
diff options
context:
space:
mode:
authorKeir Fraser <keir@xen.org>2011-10-14 18:08:04 +0100
committerKeir Fraser <keir@xen.org>2011-10-14 18:08:04 +0100
commit53e9d118042bbcf5b82b1b077e6816601050ea3e (patch)
tree2c9d03d9043d01d132d72e77d57f28d8ab62cf16 /xen/common/schedule.c
parent885aa947cfa919231537d45af918a151b7934949 (diff)
downloadxen-53e9d118042bbcf5b82b1b077e6816601050ea3e.tar.gz
xen-53e9d118042bbcf5b82b1b077e6816601050ea3e.tar.bz2
xen-53e9d118042bbcf5b82b1b077e6816601050ea3e.zip
Return -EINVAL when trying to kick/kill a nonexistent domain watchdog
... to be more in-line with the NR_DOMAIN_WATCHDOG_TIMERS check at the top of domain_watchdog(), and also to follow the timer_(delete|settime) POSIX API's EINVAL return value. Signed-off-by: Laszlo Ersek <lersek@redhat.com> Also, replace EEXIST with ENOSPC when failing to allocate a new domain watchdog. Signed-off-by: Keir Fraser <keir@xen.org> Committed-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/common/schedule.c')
-rw-r--r--xen/common/schedule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xen/common/schedule.c b/xen/common/schedule.c
index e909eec39d..95150c3149 100644
--- a/xen/common/schedule.c
+++ b/xen/common/schedule.c
@@ -754,14 +754,14 @@ static long domain_watchdog(struct domain *d, uint32_t id, uint32_t timeout)
break;
}
spin_unlock(&d->watchdog_lock);
- return id == NR_DOMAIN_WATCHDOG_TIMERS ? -EEXIST : id + 1;
+ return id == NR_DOMAIN_WATCHDOG_TIMERS ? -ENOSPC : id + 1;
}
id -= 1;
if ( !test_bit(id, &d->watchdog_inuse_map) )
{
spin_unlock(&d->watchdog_lock);
- return -EEXIST;
+ return -EINVAL;
}
if ( timeout == 0 )