Clean up system options code

Abort with error message when trying to use unsupported/disabled
system specific option.
This commit is contained in:
Miroslav Lichvar
2009-11-25 14:22:11 +01:00
parent 032838b1b0
commit e3234465e2
7 changed files with 70 additions and 63 deletions

View File

@@ -963,7 +963,9 @@ void SYS_Linux_SetScheduler(int SchedPriority)
int pmax, pmin;
struct sched_param sched;
if (SchedPriority > 0) {
if (SchedPriority < 1 || SchedPriority > 99) {
LOG_FATAL(LOGF_SysLinux, "Bad scheduler priority: %d", SchedPriority);
} else {
sched.sched_priority = SchedPriority;
pmax = sched_get_priority_max(SCHED_FIFO);
pmin = sched_get_priority_min(SCHED_FIFO);