... 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>
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 )