[libfat-xenon] Solution and suggestions about "usb2mass_ops"

Ask/talk about LibXenon Development/Compiling
Post Reply
SonicKiller
User
User
Posts: 6
Joined: Fri Dec 21, 2012 4:34 pm

[libfat-xenon] Solution and suggestions about "usb2mass_ops"

Post by SonicKiller » Mon Dec 30, 2013 11:47 pm

Hi all,

I recently ran into some compilation problems when building applications which rely on libfat-xenon.
Every time I had this error:

Code: Select all

...undefined reference to `usb2mass_ops'
To all of you who with the same problem, please be aware that this variable is no more.

It has been replaced by three variables, one for each USB port, by the following commit :
https://github.com/LibXenonProject/fat- ... 17b349b49c
The new variables are :

Code: Select all

usb2mass_ops_0 for uda:/
usb2mass_ops_1 for udb:/
usb2mass_ops_2 for udc:/
For information, getter functions linked to usb2mass_ops have changed also. Check fat-xenon sources for more info.

May I suggest the contributors to keep the variable " usb2mass_ops" and make it point on the same address as "usb2mass_ops_0" so that we can still support legacy code ?

If that's not in the future plans, at least let me know so that we can fork the fat-xenon repo, do the work and give it to people who still want to build old apps without modifying their code. For example, latest code of NullDC-360 isn't buildable anymore because of that modification.

If I'm wrong about anything, forgive me and tell me what's not right please.

Thanks.

PS : I know that's a 5 months old commit but I've been stucked for the last 3 days thinking that my code was wrong and couldn't find the info anywhere until I took a look at the libfat sources, so I think this topic could help some people who are in the same situation. ;)

User avatar
tuxuser
Administrator
Administrator
Posts: 301
Joined: Sat Feb 19, 2011 4:53 pm
Location: Germany
Contact:

Re: [libfat-xenon] Solution and suggestions about "usb2mass_ops"

Post by tuxuser » Tue Dec 31, 2013 5:48 pm

Hey,

How about specifying:

Code: Select all

#define usb2mass_ops usb2mass_ops_0
.at the top of the sourcefile from your individiual homebrew application? Does that compile and run fine? Please report so I can commit a legacy fixup.

Greetz
I have no idea what I am doing but atleast I am trying

SonicKiller
User
User
Posts: 6
Joined: Fri Dec 21, 2012 4:34 pm

Re: [libfat-xenon] Solution and suggestions about "usb2mass_ops"

Post by SonicKiller » Tue Dec 31, 2013 8:54 pm

Actually that's what I did yesterday as a workaround.  ;)

I can confirm that it is working right.
(confirmed with my code and from a fresh checkout of NullDC-360)

Thanks really much for the quick follow up !

Edit: I forget to mention that an alias should also be created for the function "get_io_usbstorage_0()" which should be called when we call "get_io_usbstorage()" in old code. That's all I remarked at my level, I hope to not forget something else on the libfat.
Last edited by SonicKiller on Tue Dec 31, 2013 9:19 pm, edited 1 time in total.

User avatar
tuxuser
Administrator
Administrator
Posts: 301
Joined: Sat Feb 19, 2011 4:53 pm
Location: Germany
Contact:

Re: [libfat-xenon] Solution and suggestions about "usb2mass_ops"

Post by tuxuser » Wed Jan 01, 2014 6:38 pm

Updated the repo.. this change already links to the new function call "get_io_usbstorage_0".. so that should be fine..
I have no idea what I am doing but atleast I am trying

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest