Hacking Possible fix for the WBFS corruption

  • Thread starter Thread starter AllWiidUp
  • Start date Start date
  • Views Views 29,100
  • Replies Replies 49
AllWiidUp said:
Patch file

CODE--- a/libwbfs.cÂÂ 2009-03-31 18:26:00.000000000 -0700
+++ b/libwbfs.cÂÂÂÂ 2009-04-12 12:28:23.516024000 -0700
@@ -389,8 +389,8 @@
}
static void free_block(wbfs_t *p,int bl)
{
-ÂÂÂÂÂÂÂÂint i = bl/(32);
-ÂÂÂÂÂÂÂÂint j = bl&31;
+ÂÂÂÂÂÂÂÂint i = (bl-1)/(32);
+ÂÂÂÂÂÂÂÂint j = (bl-1)&31;
ÂÂÂÂÂÂÂÂ u32 v = wbfs_ntohl(p->freeblks);
ÂÂÂÂÂÂÂÂ p->freeblks = wbfs_htonl(v | 1
 
nl255 said:
AllWiidUp said:
Patch file

CODE--- a/libwbfs.cÂÂ 2009-03-31 18:26:00.000000000 -0700
+++ b/libwbfs.cÂÂÂÂ 2009-04-12 12:28:23.516024000 -0700
@@ -389,8 +389,8 @@
}
static void free_block(wbfs_t *p,int bl)
{
-ÂÂÂÂÂÂÂÂint i = bl/(32);
-ÂÂÂÂÂÂÂÂint j = bl&31;
+ÂÂÂÂÂÂÂÂint i = (bl-1)/(32);
+ÂÂÂÂÂÂÂÂint j = (bl-1)&31;
ÂÂÂÂÂÂÂÂ u32 v = wbfs_ntohl(p->freeblks);
ÂÂÂÂÂÂÂÂ p->freeblks = wbfs_htonl(v | 1
 
So let me ask a simple question, and I believe most users would ask it again and again.

* Do I need the patch if I only use the previous wbfs.exe (in DOS prompt) to add/remove games? *

Million thanks to you guys!!
 
killingbee said:
So let me ask a simple question, and I believe most users would ask it again and again.

* Do I need the patch if I only use the previous wbfs.exe (in DOS prompt) to add/remove games? *

Million thanks to you guys!!

You can use any tool to add games, the bug is only in removal. Right now any loader in my first post or based on official 1.4 will work for removal. If you use an older loader or an unpatched manager or command line tool, it will corrupt the free space list and the next installed game will overwrite parts of another.

If you only use a loader to add or remove, you need one base on 1.4 or has the patch.
 
AllWiidUp said:
killingbee said:
So let me ask a simple question, and I believe most users would ask it again and again.

* Do I need the patch if I only use the previous wbfs.exe (in DOS prompt) to add/remove games? *

Million thanks to you guys!!

You can use any tool to add games, the bug is only in removal. Right now any loader in my first post or based on official 1.4 will work for removal. If you use an older loader or an unpatched manager or command line tool, it will corrupt the free space list and the next installed game will overwrite parts of another.

If you only use a loader to add or remove, you need one base on 1.4 or has the patch.

Thanks man!

I ask this question is because I still havn't got any problem after installing/removing 12~13 games on my 20g HD. And I did not use any GUI software. So will the data be broken if I still only use the wbfs.exe in command line to remove games?
 
darkten said:
AllWiidUp said:
I cloned the other git repo added my fix and put in a pull request, so we'll see when he takes it.

until then http://github.com/AllWiidUp/wbfs/tree/master

g3power set that up; he's in Europe and should be wakin' up soon; I will IM him and make him aware of your change/set you (and anyone else) up, etc.

Thanks!

d10


I sent a pull request through github.
 
AllWiidUp said:
I sent a pull request through github.

ok great!

Hey, I tried to use your libfuse.c as a straight swap and it didn't build.

Did you add your changes to the libfuse.c you cloned, or replace it?

It appears the one on your git is missing the wbfs_ren_disc() function.

d10
 
darkten said:
AllWiidUp said:
I sent a pull request through github.

ok great!

Hey, I tried to use your libfuse.c as a straight swap and it didn't build.

Did you add your changes to the libfuse.c you cloned, or replace it?

It appears the one on your git is missing the wbfs_ren_disc() function.

d10

I just cloned his, if there are functions missing from the sorg mod, I guess I could add them and request another pull.
 

Site & Scene News

Popular threads in this forum