forked from len0rd/rockbox
ypr0: Get it up and running again
7d1a47cf13 introduced a regression that broke it completely so that
it couldn't boot into the main menu anymore. It had a faulty call to
get_volume_name() which made handle_special_links() act up. This broke
every open() and opendir() (and friends) library calls.
Change-Id: I399960ca8fb6e3bcc1f25c9b4a3c19a6d28b77bd
This commit is contained in:
parent
9454ad4c97
commit
a2136a811f
1 changed files with 14 additions and 10 deletions
|
|
@ -69,8 +69,11 @@ static const char *handle_special_links(const char* link, unsigned flags,
|
||||||
{
|
{
|
||||||
(void) flags;
|
(void) flags;
|
||||||
char vol_string[VOL_MAX_LEN + 1];
|
char vol_string[VOL_MAX_LEN + 1];
|
||||||
int len = get_volume_name(-1, vol_string);
|
int len;
|
||||||
|
|
||||||
|
for (int i = 1; i < NUM_VOLUMES; i++)
|
||||||
|
{
|
||||||
|
len = get_volume_name(i, vol_string);
|
||||||
/* link might be passed with or without HOME_DIR expanded. To handle
|
/* link might be passed with or without HOME_DIR expanded. To handle
|
||||||
* both perform substring matching (VOL_NAMES is unique enough) */
|
* both perform substring matching (VOL_NAMES is unique enough) */
|
||||||
const char *begin = strstr(link, vol_string);
|
const char *begin = strstr(link, vol_string);
|
||||||
|
|
@ -82,6 +85,7 @@ static const char *handle_special_links(const char* link, unsigned flags,
|
||||||
snprintf(buf, bufsize, MULTIDRIVE_DIR"%s", begin + len);
|
snprintf(buf, bufsize, MULTIDRIVE_DIR"%s", begin + len);
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return link;
|
return link;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue