With this package working out so well I'm surprised we don't see an overflow of GUI based apps for the X11 windowing system.... Would be a snap to put together a gui to manage a WBFS drive in linux now.
HaTaX said:With this package working out so well I'm surprised we don't see an overflow of GUI based apps for the X11 windowing system.... Would be a snap to put together a gui to manage a WBFS drive in linux now.
derek.mf said:Hi,
Firstly, thanks for your great work, it is very useful and so more intuitive than any "GUI" or command line tool (even if, as a Linux user, command line is not a problem).
But (sorry, there is a "but"), I found a bug.
I explain you all I made and the context :
Distribution : Fedora Core 9.
WBFuse version used : "wbfuse_0_8_2b_i386"
Installation :
- All binaries are owned by root.
- I set the SUID on the binaries (root #> chmod u+s *)
-----------------------------------------------------------------------
Mount command used : ./wbfuse /dev/sdb1 $HOME/wbfs_part
Initializing WBFS Partition...
Number of files found: 2
OK
Image scrubbing enabled (all partitions).
Wii ISO found: Call of Duty (Wii) UK/FR [RVYP52].iso
Wii ISO found: Okami [ROWP08].iso
-----------------------------------------------------------------------
But when I make :
-----------------------------------------------------------------------
ls -l ~/wbfs_part
ls: ne peut accéder /home/me/wbfs_part/Call of Duty (Wii) UK/FR [RVYP52].iso: Aucun fichier ou dossier de ce type
total 0
-????????? ? ? ? ? ? Call of Duty (Wii) UK/FR [RVYP52].iso
-rw-rw-rw- 1 me me 4699979776 déc 8 2006 Okami [ROWP08].iso
-----------------------------------------------------------------------
The error message could be translated as :
ls: cannot access /home/me/wbfs_part/Call of Duty (Wii) UK/FR [RVYP52].iso: No such file or directory
The file does not appear in nautilus.
Is it due to the game name ?
I use my external hdd on my Wii with USB Loader v1.1 and this game is found and can be launched without problems.
I will try to have a look at your code but if you can try to fix this, would be great
One more time, thanks a lot for your work.
derek.mf
Hi,
I tried to fix the bug and it is the "/" character that causes the problem.
I made this function (it is probably bad C code but I'm a Java developer) :
CODEstatic char* replaceFuckingBadCharacters(char* a_string) {
ÂÂÂÂint str_size = strlen(a_string);
ÂÂÂÂint i;
ÂÂÂÂchar* result = malloc(sizeof(char) * str_size);
ÂÂÂÂ
ÂÂÂÂfor (i = 0; i < str_size; i++) {
ÂÂÂÂÂÂÂÂif ( a_string == '/' ) {
ÂÂÂÂÂÂÂÂÂÂÂÂresult = '\\';
ÂÂÂÂÂÂÂÂ}
ÂÂÂÂÂÂÂÂelse {
ÂÂÂÂÂÂÂÂÂÂÂÂresult = a_string;
ÂÂÂÂÂÂÂÂ}
ÂÂÂÂ}
ÂÂÂÂ
ÂÂÂÂfprintf(stderr, "Result is : %s", result);
ÂÂÂÂreturn result;
ÂÂÂÂ
}
Then, I changed the "initFuseWbfs" function :
old code :
Code:ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ if (!v) { ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂsprintf(discinfo->title_filename, "%s [%s].iso", discinfo->title_name, discinfo->title_id); ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ} else { ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ//sprintf(discinfo->title_filename, "NOTWii_%s", discinfo->title_name); ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂsprintf(discinfo->title_filename, "%s", discinfo->title_name); ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ}
new code :
Code:ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ if (!v) { ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂsprintf(discinfo->title_filename, "%s [%s].iso", replaceFuckingBadCharacters(discinfo->title_name), discinfo->title_id); ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ} else { ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ//sprintf(discinfo->title_filename, "NOTWii_%s", discinfo->title_name); ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂsprintf(discinfo->title_filename, "%s", discinfo->title_name); ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ}
It seems to work :
but I suppose it can cause problems in the "renameFile" function because, even if it is not wanted, the "/" character will be replaced by the "\". Maybe, the "renameFile" function should make the inverse conversion ("\" --> "/").Code:ll ~/wbfs_part/ total 0 -rw-rw-rw- 1 me me 4699979776 2006-12-08 01:00 Call of Duty (Wii) UK\FR [RVYP52].iso -rw-rw-rw- 1 me me 4699979776 2006-12-08 01:00 Okami [ROWP08].iso
I don't want to make the test because my "replaceFuckingBadCharacters" function seems to have bug. At first, I tried to use it in the "readDirectory" function but, each time I was calling "ls -l" in the mounted directory, a new character was added to the file name :
exemple of first call :
Code:ll ~/wbfs_part/ total 0 -rw-rw-rw- 1 me me 4699979776 2006-12-08 01:00 Call of Duty (Wii) UK\FR [RVYP52].iso -rw-rw-rw- 1 me me 4699979776 2006-12-08 01:00 Okami [ROWP08].iso
exemple of second call :
CODEll ~/wbfs_part/
total 0
-rw-rw-rw- 1 me me 4699979776 2006-12-08 01:00 Call of Duty (Wii) UK\FR [RVYP52].isoo
-rw-rw-rw- 1 me me 4699979776 2006-12-08 01:00 Okami [ROWP08].isoo
//define replacement char here
#define GOODCHAR '.'
void replaceFuckingBadCharacters(const char* a_string) {
ÂÂchar * badchar=strchr(a_string,(int)'/');
ÂÂwhile(badchar!=NULL){
ÂÂÂÂ(*badchar)=GOODCHAR;
ÂÂÂÂbadchar=strchr(a_string,(int)'/');
ÂÂ}
}
dajavax said:"Initializing WBFS Partition...
ERROR: Invalid WBFS partition."
maybe it's the fact i'm using an ipod as the WBFS disk... with no other partition only WBFS (i deleted the system partition)... ubuntu shows a "USB Drive" with an iPod image as an icon but when i click eject it tells me there's no media in the drive... would this be the problem?... any way to solve it?
Does it work on your Wii ?
Posts merged
foobar said:Yeah, that function will likely cause a memory leak. Your best option is to mangle the original string. Here's an attempt that uses the c strchr function to locate characters.
Caveat emptor: totally untested.
edit: noticed bug and fixed it. told ya, and there are probably many more.
CODE//define replacement char here
#define GOODCHAR '.'
void replaceFuckingBadCharacters(const char* a_string) {
ÂÂchar * badchar=strchr(a_string,(int)'/');
ÂÂwhile(badchar!=NULL){
ÂÂÂÂ(*badchar)=GOODCHAR;
ÂÂÂÂbadchar=strchr(a_string,(int)'/');
ÂÂ}
}
yes it does... and same for every other WBFS manager... linux ones or windows ones... just found this one out and decided it was a great idea so i decided to try it but that's what happens... (i was using ubuntu intrepid btw... but just updated to jaunty so i might try again)derek.mf said:dajavax said:"Initializing WBFS Partition...
ERROR: Invalid WBFS partition."
maybe it's the fact i'm using an ipod as the WBFS disk... with no other partition only WBFS (i deleted the system partition)... ubuntu shows a "USB Drive" with an iPod image as an icon but when i click eject it tells me there's no media in the drive... would this be the problem?... any way to solve it?
Does it work on your Wii ?
yes it shouldSpAM_CAN said:Would this work with Mac FUSE? Probably not...
OSX86torito21 said:Version 0.8 released.
Changelog:
* Minor bug fixes.
* Added an option to scrub images (-s option)
* Added an option to scrub previously written to the partition (rename to "scrub"(without quotes)).
Thanks for the bug reports.
About the mac port... I don't have a Mac xD
exactly the description of what happens to me... kind off... and i actually put a mount point and not "mount_point"Blue-K said:OSX86torito21 said:Version 0.8 released.
Changelog:
* Minor bug fixes.
* Added an option to scrub images (-s option)
* Added an option to scrub previously written to the partition (rename to "scrub"(without quotes)).
Thanks for the bug reports.
About the mac port... I don't have a Mac xD.
Anyways, this is exactly what I need, but unfortunately, I have some problems...It took me realy long to find out how to install the libfuse-dev package and change USE_USE_VERSION to 26, but I managed it somehow to do all this correctly (I'm using Jaunty btw)...next thing: I went to GParted, and searched for my USB-HD which has two Partitions (FAT32 & WBFS). Found the Game Partition, which turned out to be /dev/sdb2...Now I go to terminal, drag the wbfuse there, and add the lines like described...and now I fail always...
I tried:
$ '/wbfuse/wbfuse' /dev/sdb2 mount_point [-n]
$ '/wbfuse/wbfuse' /dev/sdb2 [-n]
$ '/wbfuse/wbfuse' /dev/sdb2 mount_point -n
$ '/wbfuse/wbfuse' /dev/sdb2 -n
$ '/wbfuse/wbfuse' /dev/sdb2 mount_point
$ '/wbfuse/wbfuse' /dev/sdb2
etc...
All I get is the Instructions Screen and/or a:
"Initializing WBFS Partition...
ERROR: Invalid WBFS partition."
What goes wrong? The Partition works perfect with the Windows-Tools and the USBLoader...Can somebody please help me? I realy want this...
Thanks in Advance....
Would you mind sharing how you did that?METZElmaennchen said:Just added a little udev rule and it gets mounted on the fly when I plugin the drive.
derek.mf said:Thanks for the help but.... Why a memory leak ? because of the malloc without being able to free the memory, I suppose ?
Exactly. The function does return the pointer, so you'd have to call free() on the return value later. But since it is immediately passed as a function parameter, the pointer goes out of scope and there's no way to free the memory.
One solution would be to store the result to a char* and call free() on it after you're done. It'd look something like:
Code:char* foo=replaceFuckingBadChars(string); //call functions with foo or otherwise make use of it free(foo);
Malloc and free are pretty slow. As long as modifying the original string doesn't break anything or actually cause the file to be renamed, it's a faster option.
I may play with this more after exams are over.
fusermount -u /path/to/mountpointlexlth said:Btw... .how do I umount the partition ???
I've seen issues with umount and fuse before. Possibly related to this bug: https://bugs.launchpad.net/ubuntu/+source/s...use/+bug/243298
The workaround is to use the following instead of the gui right click menu or "umount"
CODE
pepperoni said:Any chance of a version that incorporates Hermes' .ciso file extension, so you can access the 'scrubbed' iso files?