Notice user, that root priviledges are required.

This commit is contained in:
Rafal Kupiec 2019-12-18 17:33:53 +01:00
parent a4422e188e
commit 7704162255
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
1 changed files with 4 additions and 0 deletions

View File

@ -132,6 +132,10 @@ int main(int argc, char *argv[]) {
return 1;
}
}
if(geteuid() != 0) {
printf("This program needs to be launched as root!\n");
return 1;
}
if(action == ACTION_ENABLE) {
if(!cpu || !mem) {
printf("No CPU or memory pinning specified!\n");