int _start(int argc, char** argv) { if(InitFAT() != 0) { printf("Error initializing FAT driver!\n"); return MODULE_NO_RESIDENT_END; } init_ieee1394DiskDriver(); InitFS(); return MODULE_RESIDENT_END; }
int _start(int argc, char** argv) { if(InitFAT() != 0) { printf("Error initializing FAT driver!\n"); return MODULE_NO_RESIDENT_END; } init_ieee1394DiskDriver(); DelDrv(dev_name); AddDrv(&device_driver); #if 0 iop_sys_clock_t lTime; u32 lSecStart, lUSecStart; u32 lSecEnd, lUSecEnd, nbytes; int fd, size, bytesToRead, block_size; printf("trying to open file..."); while((fd=open("sd0:PS2ESDL/SLPM_55052_00.pdi", O_RDONLY))<0){DelayThread(2000);}; nbytes=size=lseek(fd, 0, SEEK_END)/4; block_size=2048*512; lseek(fd, 0, SEEK_SET); printf("Read test start\n" ); GetSystemTime ( &lTime ); SysClock2USec ( &lTime, &lSecStart, &lUSecStart ); void *buffer; if((buffer=malloc(block_size))==NULL) printf("Unable to allocate memory. :(\n"); printf("Read test: %p.\n", buffer); while(size>0){ bytesToRead=(size>(block_size))?(block_size):size; read(fd, buffer, bytesToRead); size-=bytesToRead; } free(buffer); printf("Completed.\n"); GetSystemTime ( &lTime ); SysClock2USec ( &lTime, &lSecEnd, &lUSecEnd ); close(fd); printf("Done: %lu %lu/%lu %lu\n", lSecStart, lUSecStart, lSecEnd, lUSecEnd ); printf("KB: %ld, time: %ld, Approximate KB/s: %ld.\n", (nbytes/1024), (lSecEnd -lSecStart), (nbytes/1024)/(lSecEnd -lSecStart)); #endif return MODULE_RESIDENT_END; }
int _start(int argc, char** argv) { M_PRINTF("IEEE1394 Driver v%d.%d\n", MAJOR_VER, MINOR_VER); // initialize the SCSI driver if (scsi_init() != 0) { M_PRINTF("ERROR: initializing SCSI driver!\n"); return MODULE_NO_RESIDENT_END; } // initialize the IEEE1394 driver init_ieee1394DiskDriver(); return MODULE_RESIDENT_END; }