- Joined
- Mar 15, 2009
- Messages
- 1,720
- Trophies
- 0
- Age
- 32
- Location
- Pennsylvania
- Website
- Visit site
- XP
- 316
- Country
Hi all,
I'm looking for some help getting ISFS_RENAME() to work in a program I'm working on. It keeps returning with error -101 (EINVAL) when I run it on my wii. AHBPROT is used for FS permissions (to eliminate error -102).
Interestingly, this exact same DOL works perfectly on UNEEK.
The files that are to be renamed do exist. They're part of a dummy channel (titleID 00010001-41414141) I installed for this program, and I verified their existence with FSToolbox. Both 00000000.app and 00000003.app are channel banners. The idea is that when the DOL runs, it swaps the banners, changing the appearance of the channel.
Below is a commented copy of my main() function from a test DOL. The DOL is run via WiiLoad to an HBC 1.0.8 using IOS58.
Anybody got a clue why this won't work?
CODEint main(int argc, char *argv[])
{
initialiseWiiApp(); //Contains the VIDEO_INIT(), PAD_INIT(), etc...
clearConsole(BLACK);
if (!IOSPATCH_Apply()) { //This applies FS_permissions patch to running IOS with AHBPROT (function from IOSPATCH.C from FTPii).
printf("ERROR: Failure applying memory patches.");
}
//IOS_ReloadIOS(249); //Also tried this in place of the above AHBPROT patch. No change.
int rets;
rets = ISFS_Initialize();
sleep(2);
printf("\nOpen ISFS: %d\n",rets);
//ISFS_Mount();
rets = ISFS_Rename("/title/00010001/41414141/content/00000000.app","/title/00010001/41414141/content/00000004.app"); //Returns -101
printf("\nISFS_Rename() returned %d\n", rets);
rets = ISFS_Rename("/title/00010001/41414141/content/00000003.app","/title/00010001/41414141/content/00000000.app"); //Returns -101
printf("\nISFS_Rename() returned %d\n", rets);
rets = ISFS_Rename("/title/00010001/41414141/content/00000004.app","/title/00010001/41414141/content/00000003.app"); //Returns -106 (expected, this file won't exist if above actions fail.)
printf("\nISFS_Rename() returned %d\n", rets);
ISFS_Deinitialize();
sleep(5);
return 0;
}
I'm looking for some help getting ISFS_RENAME() to work in a program I'm working on. It keeps returning with error -101 (EINVAL) when I run it on my wii. AHBPROT is used for FS permissions (to eliminate error -102).
Interestingly, this exact same DOL works perfectly on UNEEK.
The files that are to be renamed do exist. They're part of a dummy channel (titleID 00010001-41414141) I installed for this program, and I verified their existence with FSToolbox. Both 00000000.app and 00000003.app are channel banners. The idea is that when the DOL runs, it swaps the banners, changing the appearance of the channel.
Below is a commented copy of my main() function from a test DOL. The DOL is run via WiiLoad to an HBC 1.0.8 using IOS58.
Anybody got a clue why this won't work?
CODEint main(int argc, char *argv[])
{
initialiseWiiApp(); //Contains the VIDEO_INIT(), PAD_INIT(), etc...
clearConsole(BLACK);
if (!IOSPATCH_Apply()) { //This applies FS_permissions patch to running IOS with AHBPROT (function from IOSPATCH.C from FTPii).
printf("ERROR: Failure applying memory patches.");
}
//IOS_ReloadIOS(249); //Also tried this in place of the above AHBPROT patch. No change.
int rets;
rets = ISFS_Initialize();
sleep(2);
printf("\nOpen ISFS: %d\n",rets);
//ISFS_Mount();
rets = ISFS_Rename("/title/00010001/41414141/content/00000000.app","/title/00010001/41414141/content/00000004.app"); //Returns -101
printf("\nISFS_Rename() returned %d\n", rets);
rets = ISFS_Rename("/title/00010001/41414141/content/00000003.app","/title/00010001/41414141/content/00000000.app"); //Returns -101
printf("\nISFS_Rename() returned %d\n", rets);
rets = ISFS_Rename("/title/00010001/41414141/content/00000004.app","/title/00010001/41414141/content/00000003.app"); //Returns -106 (expected, this file won't exist if above actions fail.)
printf("\nISFS_Rename() returned %d\n", rets);
ISFS_Deinitialize();
sleep(5);
return 0;
}