From: notaz Date: Thu, 13 Dec 2007 20:52:10 +0000 (+0000) Subject: mmuhack.o path fix X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5e83fffdf28460325606d58c03694d6f70bba8c1;p=libpicofe.git mmuhack.o path fix git-svn-id: file:///home/notaz/opt/svn/PicoDrive/platform@312 be3aeb3a-fb24-0410-a615-afba39da0efa --- diff --git a/gp2x/squidgehack.c b/gp2x/squidgehack.c index 36e9bcb..28f997f 100644 --- a/gp2x/squidgehack.c +++ b/gp2x/squidgehack.c @@ -22,14 +22,13 @@ int mmuhack(void) strcpy(kocmd, "/sbin/insmod "); strncpy(kocmd+13, g_argv[0], 1023-13); kocmd[1023] = 0; - for (i = strlen(kocmd); i > 0; i--) - if (kocmd[i] == '/') { kocmd[i] = 0; break; } - strcat(kocmd, "/mmuhack.o"); + for (i = strlen(kocmd); i > 13; i--) + if (kocmd[i] == '/') { i++; break; } + strcpy(kocmd+i, "mmuhack.o"); printf("Installing NK's kernel module for Squidge MMU Hack (%s)...\n", kocmd); system(kocmd); mmufd = open("/dev/mmuhack", O_RDWR); - if(mmufd < 0) return 0; close(mmufd);