| 68 | } |
| 69 | |
| 70 | const LauncherPartitionEntry * |
| 71 | findSourcePartition(const LauncherPartitionTable &table, const LauncherPartitionEntry &target) { |
| 72 | const LauncherPartitionEntry *fallback = nullptr; |
| 73 | for (const LauncherPartitionEntry &entry : table.entries) { |
| 74 | if (!samePartitionIdentity(entry, target)) continue; |
| 75 | if (entry.subtype == target.subtype) return &entry; |
| 76 | if (!fallback) fallback = &entry; |
| 77 | } |
| 78 | return fallback; |
| 79 | } |
| 80 | |
| 81 | void setError(String *error, const char *message) { |
| 82 | if (error) *error = message; |
no test coverage detected