diff options
author | nectar <nectar@FreeBSD.org> | 2003-09-13 18:46:24 +0000 |
---|---|---|
committer | nectar <nectar@FreeBSD.org> | 2003-09-13 18:46:24 +0000 |
commit | f158e368c20ded5dc5e2c0de7944970159426794 (patch) | |
tree | 5c18106dbca66446bf07dbdb3772c5a812e2053f | |
parent | 05db443aaf1f96ab25a7ffef3f15add573d52538 (diff) | |
download | FreeBSD-src-f158e368c20ded5dc5e2c0de7944970159426794.zip FreeBSD-src-f158e368c20ded5dc5e2c0de7944970159426794.tar.gz |
sched_setscheduler: Return EINVAL when a invalid policy is specified,
thus complying with POLA and the man page. (Previously, no error was
returned for this case.)
-rw-r--r-- | sys/kern/ksched.c | 4 | ||||
-rw-r--r-- | sys/posix4/ksched.c | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/sys/kern/ksched.c b/sys/kern/ksched.c index 950cbb2..6ef2940 100644 --- a/sys/kern/ksched.c +++ b/sys/kern/ksched.c @@ -228,6 +228,10 @@ int ksched_setscheduler(register_t *ret, struct ksched *ksched, mtx_unlock_spin(&sched_lock); } break; + + default: + e = EINVAL; + break; } return e; diff --git a/sys/posix4/ksched.c b/sys/posix4/ksched.c index 950cbb2..6ef2940 100644 --- a/sys/posix4/ksched.c +++ b/sys/posix4/ksched.c @@ -228,6 +228,10 @@ int ksched_setscheduler(register_t *ret, struct ksched *ksched, mtx_unlock_spin(&sched_lock); } break; + + default: + e = EINVAL; + break; } return e; |