GernotFrisch
Member
- Joined
- Jan 2, 2007
- Messages
- 445
How to apply? Modprobe or insmod?
Code:
if(bOpen2X)
{
printf("On Open2X modprobing mmuhack.o\n");
system("/sbin/modprobe mmuhack");
}
else
{
//Try to apply MMU hack.
int mmufd = open("/dev/mmuhack", O_RDWR);
if(mmufd < 0)
{
system("/sbin/insmod mmuhack.o");
mmufd = open("/dev/mmuhack", O_RDWR);
}
if(mmufd < 0)
{
printf("MMU hack failed\n");
}
else
{
close(mmufd);
}
}