Skip to content

Commit

Permalink
- Add swiss_r*.dol to autoboot list.
Browse files Browse the repository at this point in the history
  • Loading branch information
Extrems committed Sep 14, 2024
1 parent 802409f commit 7031468
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cube/swiss/source/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ char *stripInvalidChars(char *str)
}

/* Autoboot DOL from the current device, from the current autoboot_dols list */
char *autoboot_dols[] = { "/boot.dol", "/boot2.dol" }; // Keep this list sorted
char *autoboot_dols[] = {"*/boot.dol", "*/boot2.dol", "*/swiss_r[1-9]*.dol"}; // Keep this list sorted
void load_auto_dol() {
u8 rev_buf[sizeof(GITREVISION) - 1]; // Don't include the NUL termination in the comparison

Expand All @@ -166,7 +166,7 @@ void load_auto_dol() {
int dirEntryCount = getSortedDirEntryCount();
for (int i = 0; i < dirEntryCount; i++) {
for (int f = 0; f < (sizeof(autoboot_dols) / sizeof(char *)); f++) {
if (endsWith(dirEntries[i]->name, autoboot_dols[f])) {
if (!fnmatch(autoboot_dols[f], dirEntries[i]->name, FNM_PATHNAME | FNM_CASEFOLD)) {
// Official Swiss releases have the short commit hash appended to
// the end of the DOL, compare it to our own to make sure we don't
// bootloop the same version
Expand Down

0 comments on commit 7031468

Please sign in to comment.