diff options
Diffstat (limited to 'loader2/hardware.c')
-rw-r--r-- | loader2/hardware.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/loader2/hardware.c b/loader2/hardware.c index b22d124b1..72d8ce3cc 100644 --- a/loader2/hardware.c +++ b/loader2/hardware.c @@ -318,3 +318,27 @@ void dasdSetup(moduleList modLoaded, moduleDeps modDeps, #endif } +void spufsSetup(moduleList modLoaded, moduleDeps modDeps, + moduleInfoSet modInfo) { +#if !defined(__powerpc__) + return; +#else + FILE *fd; + fd = fopen("/proc/cpuinfo", "r"); + if(fd) { + char buf[1024]; + while (fgets(buf, 1024, f) != NULL) { + if(!strncmp(buf, "cpu\t\t:", 5)) { + if(strstr(buf, "Cell")) { + mlLoadModule("spufs", modLoaded, modDeps, modInfo, NULL); + break; + } + } + } + fclose(fd); + return; + } else { + return; + } +#endif +} |