| 52 | } |
| 53 | |
| 54 | s32 __CARDIsWritable(CARDControl *card, CARDDir *entry) |
| 55 | { |
| 56 | const DVDDiskID *diskID = card->diskID; |
| 57 | s32 result; |
| 58 | u8 perm; |
| 59 | |
| 60 | result = __CARDAccess(card, entry); |
| 61 | if (result == CARD_RESULT_NOPERM) |
| 62 | { |
| 63 | perm = (u8)(entry->permission & __CARDPermMask); |
| 64 | |
| 65 | if ((perm & 0x20) && (memcmp(entry->gameName, __CARDDiskNone.gameName, 4) == 0 && memcmp(entry->company, __CARDDiskNone.company, 2) == 0)) |
| 66 | { |
| 67 | return CARD_RESULT_READY; |
| 68 | } |
| 69 | |
| 70 | if ((perm & 0x40) && (memcmp(entry->gameName, __CARDDiskNone.gameName, 4) == 0 && memcmp(entry->company, diskID->company, 2) == 0)) |
| 71 | { |
| 72 | return CARD_RESULT_READY; |
| 73 | } |
| 74 | } |
| 75 | return result; |
| 76 | } |
| 77 | |
| 78 | s32 __CARDIsReadable(CARDControl* card, CARDDir* entry) |
| 79 | { |
no test coverage detected