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.)
This commit is contained in:
Jacques Vidrine 2003-09-13 18:46:24 +00:00
parent c08c4e81fc
commit 5949ba2136
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=120033
2 changed files with 8 additions and 0 deletions

View File

@ -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;

View File

@ -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;