/* * Resets an existing registry. * * Returns: * 0 Success. * SYSTEM_ERROR System error. "log_flush()" called. */ static Status resetRegistry(void) { log_debug("Resetting registry"); if (0 != reg_reset()) { log_error("Couldn't reset registry"); return SYSTEM_ERROR; } return 0; }
static void test_regReset(void) { RegStatus status; status = reg_reset(); if (status) { log_error("test_regReset(): Couldn't reset registry"); } else { CU_ASSERT_EQUAL(status, 0); } }
DSTATUS disk_initialize ( BYTE pdrv /* Physical drive nmuber (0..) */ ) { DSTATUS stat; int result; printf("[diskio] : Inside disk_initialize(%x)\n", pdrv); switch (pdrv) { case ATA : //result = ATA_disk_initialize(); result = reg_reset(0); printf("[diskio] : Found %d PATA devices\n", reg_config()); // translate the reslut code here printf("[diskio] : PATA device 0 reset status: %d \n", result); return stat; //case MMC : //result = MMC_disk_initialize(); // translate the reslut code here //return stat; //case USB : //result = USB_disk_initialize(); // translate the reslut code here //return stat; } return STA_NOINIT; }