libntfs_ext library compilation with cellsdk

And I added a simple VS2010 test project for Windows as well.
It might come in handy to test & debug under DEX.
 
And I added a simple VS2010 test project for Windows as well.
It might come in handy to test & debug under DEX.
Cool thanks :)

I don't know if this is the good method but this is what i did:

The struct __syscalls_t is in the header <sys/syscalls.h> of psl1ght.
In ps3_io.c we have:
Code:
extern struct __syscalls_t __syscalls;
I simply remove "extern" and now i have no more reference to undefined symbol "__syscalls".

Even if we rewrite this struct, if it is missing from headers of cellsdk, we'll got a complain about reference to undefined symbol. So, is it good to remove "extern" or there is an other way to fix that ?
 
Last edited:
I have been testing too.

1 warning left during compilation.

Trying to use the library atm gives a few undefined symbol __syscalls errors then undefined symbol .panic...

I am not sure about reentrant syscalls either. That's what bothered me most before when I looked into the port...
For undefined symbol .panic i found it defined in ntfsinternal.h
Code:
extern void panic(const char *fmt, ...);
This was added by Andoma, so maybe this is only compatible with psl1ght v1
 
For undefined symbol .panic i found it defined in ntfsinternal.h
Code:
extern void panic(const char *fmt, ...);
This was added by Andoma, so maybe this is only compatible with psl1ght v1
I was completely wrong. The function panic had just no definition, so i added it in ntfsinternal.c and this fixed the issue. Same for mutex_dump_info and trace functions.

Edit: i also fixed the reference to undefined symbol "__syscalls" by declaring the structure static before declaring it extern. This is not the best way to fix the issue...
Now it's time to test this library guys :)
 
Last edited:
panic is a function of movian https://github.com/andoma/movian/bl...8a5a7395bb49d356/src/arch/ps3/ps3_trap.c#L213
so i remplaced it by ntfs_log_warning. i also moved files inside "source/includes" to "source" and the directory "ps3defines" to "source/ps3define"/ . I hope it won't bother you.

I copied pasted the sample of estwald and removed everything related to libtyny3D (graphic lib) and libpad (gamepad lib) then I added a log file in /dev_hdd0/libntfs_log.txt. Anyway, now it compile without any error, I didn't try it the sample yet.
 
meh i can't push my commit because u did just before me...:'(

Anyway, i ignore what i did for panic. i give it to u here:

//extern void panic(const char *fmt, ...);
#define panic(...) ntfs_log_warning(__VA_ARGS__)
 
panic is a function of movian https://github.com/andoma/movian/bl...8a5a7395bb49d356/src/arch/ps3/ps3_trap.c#L213
so i remplaced it by ntfs_log_warning. i also moved files inside "source/includes" to "source" and the directory "ps3defines" to "source/ps3define"/ . I hope it won't bother you.

I copied pasted the sample of estwald and removed everything related to libtyny3D (graphic lib) and libpad (gamepad lib) then I added a log file in /dev_hdd0/libntfs_log.txt. Anyway, now it compile without any error, I didn't try it the sample yet.
Thanks Zar ! That was my first intuition about ntfs_log_warning. "includes" folder was temporary to differentiate originals files from new files we added.
I just looked at your commit, everything is perfect. Thanks again Zar, the sample will be useful.
 
  • Like
Reactions: Zar
I copied pasted the sample of estwald and removed everything related to libtyny3D (graphic lib) and libpad (gamepad lib) then I added a log file in /dev_hdd0/libntfs_log.txt. Anyway, now it compile without any error, I didn't try it the sample yet.
I can't compile the sample. The makefile seems to missing instruction to build EBOOT.BIN

Edit: nevermind, i fixed this.
ps: i've got no "shell" command in my system, so i replaced it by "sh"
 
Last edited:
@Zar,

I just tested the sample. When i launch it, i've got a blackscreen. After a few seconds something appears at the screen (very quickly, impossible to see what it is, and for sure it's not an ufo), then the ps3 comes back to the XMB.

I looked at hdd0, and on my ntfs partition, there was no files created ('libntfs_sample_log.txt" or "test.txt").
 
Have I ever told you that I love you @Zar...
Lol...

Btw do you know about those reentrant syscalls? I would not mind just a beginning of explanation...
 
The build is fixed. I tested it, it create the log file but the sample is not working. There is something wrong with the lib or with the sample, i rly don't know.
 
The build is fixed. I tested it, it create the log file but the sample is not working. There is something wrong with the lib or with the sample, i rly don't know.
And what are in the log file in hdd0 ? Nothing revelant ?

Ps: On the repo, your merging of makefile is not clean.
 
The build is fixed. I tested it, it create the log file but the sample is not working. There is something wrong with the lib or with the sample, i rly don't know.
I rewrited the sample, and just call simple functions like this :
Code:
ntfsMountAll(&mounts, NTFS_DEFAULT | NTFS_RECOVER /* | NTFS_READ_ONLY */ );

ps3ntfs_open("ntfs0:/text.txt", O_CREAT | O_WRONLY | O_TRUNC, 0777);

for (u8 u = 0; u < mountCount; u++) ntfsUnmount(mounts[u].name, 1);
And guess what ? When i launched the sample, i could see the led of my external HDD blinking.
Then i looked at the ntfs partition, and there is a text.txt file.

So i think there is something wrong when you mounting the partition(s) with your code. And we can say that some essentials functions of the library works.
 
I also checked on my side & so far success.
I have not yet tried many functions but ntfs drives can be mounted & read/written.
I will test further later & update the Windows sample of the repo with what I keep adding to it for testing...
 
Last edited:
I think we should do light version of the lib without I/O and without EXT support. with a "#define _CELLSDK_LIGHT" tag ?
No one is using ext hdd and the use of stdio function slow the execution, I noticied it on ManaGunZ.
Moreover, the size is too big too include it in sprx like webMAN MOD, it's better to reduce the lightest possible size of the sprx.
 

Similar threads

Back
Top