[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] use XEN_SYSCTL_SCHEDOP_* for sysctl operation checks
commit 140cbb69c15e0cc6469121af4aaa53f462f63313 Author: Juergen Gross <jgross@xxxxxxxx> AuthorDate: Wed Feb 24 12:05:58 2016 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Wed Feb 24 12:05:58 2016 +0100 use XEN_SYSCTL_SCHEDOP_* for sysctl operation checks In flask_sysctl_scheduler_op() and sched_adjust_global() the test for the desired operation is done with the wrong constants. While the values are correct, the names are not. Correct the error message for the case of an unknown operation in flask_sysctl_scheduler_op(), too. Signed-off-by: Juergen Gross <jgross@xxxxxxxx> Reviewed-by: George Dunlap <george.dunlap@xxxxxxxxxx> Acked-by: Jan Beulich <jbeulich@xxxxxxxx> --- xen/common/schedule.c | 4 ++-- xen/xsm/flask/hooks.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/xen/common/schedule.c b/xen/common/schedule.c index 27695e3..434dcfc 100644 --- a/xen/common/schedule.c +++ b/xen/common/schedule.c @@ -1171,8 +1171,8 @@ long sched_adjust_global(struct xen_sysctl_scheduler_op *op) if ( rc ) return rc; - if ( (op->cmd != XEN_DOMCTL_SCHEDOP_putinfo) && - (op->cmd != XEN_DOMCTL_SCHEDOP_getinfo) ) + if ( (op->cmd != XEN_SYSCTL_SCHEDOP_putinfo) && + (op->cmd != XEN_SYSCTL_SCHEDOP_getinfo) ) return -EINVAL; pool = cpupool_get_by_id(op->cpupool_id); diff --git a/xen/xsm/flask/hooks.c b/xen/xsm/flask/hooks.c index f63c3e2..4813623 100644 --- a/xen/xsm/flask/hooks.c +++ b/xen/xsm/flask/hooks.c @@ -529,14 +529,14 @@ static int flask_sysctl_scheduler_op(int op) { switch ( op ) { - case XEN_DOMCTL_SCHEDOP_putinfo: + case XEN_SYSCTL_SCHEDOP_putinfo: return domain_has_xen(current->domain, XEN__SETSCHEDULER); - case XEN_DOMCTL_SCHEDOP_getinfo: + case XEN_SYSCTL_SCHEDOP_getinfo: return domain_has_xen(current->domain, XEN__GETSCHEDULER); default: - printk("flask_domctl_scheduler_op: Unknown op %d\n", op); + printk("flask_sysctl_scheduler_op: Unknown op %d\n", op); return -EPERM; } } -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |