libntfs_ext library compilation with cellsdk

Thanks... Hopefully I'll get my ps3 tomorrow, because this way of testing is really slow ;)

late edit: All ftp functions are now implemented... hopefully they work ;) the link is updated with the new test sprx.
 
Last edited:
Thanks... Hopefully I'll get my ps3 tomorrow, because this way of testing is really slow ;)
Sure, debugging is already painful enough without adding more hurdles to it.
However I do not mind at all. Whenever you need. Except in the next couple of hours lol
 
@deank

with the new test version.. I was able to mount dev_ntfs0v

upload_2017-1-18_14-32-16.png


Code:
[14:30:35] [L] Connecting to 192.168.137.40 -> IP=192.168.137.40 PORT=21
[14:30:38] [L] Connected to 192.168.137.40
[14:30:38] [L] 220-VSH ftpd
[14:30:38] [L] 220 webMAN ftpd 1.45n [NTFS:1]
[14:30:38] [L] USER anonymous
[14:30:38] [L] 331 OK
[14:30:38] [L] PASS (hidden)
[14:30:38] [L] 230 OK
[14:30:38] [L] SYST
[14:30:38] [L] 215 UNIX Type: L8
[14:30:38] [L] FEAT
[14:30:38] [L] 211-Ext:
[14:30:38] [L]  SIZE
[14:30:38] [L]  MDTM
[14:30:38] [L]  PORT
[14:30:38] [L]  CDUP
[14:30:38] [L]  ABOR
[14:30:38] [L]  REST STREAM
[14:30:38] [L]  PASV
[14:30:38] [L]  LIST
[14:30:38] [L]  MLSD
[14:30:38] [L]  MLST type*;size*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;
[14:30:38] [L] 211 End
[14:30:38] [L] PWD
[14:30:38] [L] 257 "/"
[14:30:38] [L] PASV
[14:30:38] [L] 227 Entering Passive Mode (192,168,137,40,144,42)
[14:30:38] [L] Opening data connection IP: 192.168.137.40 PORT: 36906
[14:30:38] [L] MLSD
[14:30:38] [L] 150 OK
[14:30:38] [L] 226 OK
[14:30:38] [L] List Complete: 655 bytes in 0.07 seconds (0.6 KB/s)
[14:30:44] [L] CWD dev_ntfs0v
[14:30:44] [L] 250 OK
[14:30:44] [L] PWD
[14:30:44] [L] 257 "/dev_ntfs0v"
[14:30:44] [L] PASV
[14:30:44] [L] 227 Entering Passive Mode (192,168,137,40,144,42)
[14:30:44] [L] Opening data connection IP: 192.168.137.40 PORT: 36906
[14:30:44] [L] MLSD
[14:30:44] [L] 550 Error
[14:30:45] [L] List Error
[14:30:45] [L] PASV
[14:30:45] [L] 227 Entering Passive Mode (192,168,137,40,144,42)
[14:30:45] [L] Opening data connection IP: 192.168.137.40 PORT: 36906
[14:30:45] [L] MLSD
[14:30:45] [L] 550 Error
[14:30:46] [L] List Error

But I couldn't browse contents inside, perhaps some commands don't work
 
All functions are implemented, but probably something else is not ok. You can test manually with /dev_ntfs1v/ up to 7.
I

Sent from my Lenovo P1a42 using Tapatalk
 
All functions are implemented, but probably something else is not ok. You can test manually with /dev_ntfs1v/ up to 7.
I

Sent from my Lenovo P1a42 using Tapatalk

Code:
[14:42:39] [L] Connecting to 192.168.137.40 -> IP=192.168.137.40 PORT=21
[14:42:39] [L] Connected to 192.168.137.40
[14:42:39] [L] 220-VSH ftpd
[14:42:39] [L] 220 webMAN ftpd 1.45n [NTFS:1]
[14:42:39] [L] USER anonymous
[14:42:39] [L] 331 OK
[14:42:39] [L] PASS (hidden)
[14:42:39] [L] 230 OK
[14:42:39] [L] SYST
[14:42:39] [L] 215 UNIX Type: L8
[14:42:39] [L] FEAT
[14:42:39] [L] 211-Ext:
[14:42:39] [L]  SIZE
[14:42:39] [L]  MDTM
[14:42:39] [L]  PORT
[14:42:39] [L]  CDUP
[14:42:39] [L]  ABOR
[14:42:39] [L]  REST STREAM
[14:42:39] [L]  PASV
[14:42:39] [L]  LIST
[14:42:39] [L]  MLSD
[14:42:39] [L]  MLST type*;size*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;
[14:42:39] [L] 211 End
[14:42:39] [L] PWD
[14:42:39] [L] 257 "/"
[14:42:39] [L] PASV
[14:42:39] [L] 227 Entering Passive Mode (192,168,137,40,138,250)
[14:42:39] [L] Opening data connection IP: 192.168.137.40 PORT: 35578
[14:42:39] [L] MLSD
[14:42:39] [L] 150 OK
[14:42:39] [L] 226 OK
[14:42:39] [L] List Complete: 746 bytes in 0.07 seconds (0.7 KB/s)
[14:42:41] [L] CWD dev_ntfs0v
[14:42:41] [L] 250 OK
[14:42:41] [L] PWD
[14:42:41] [L] 257 "/dev_ntfs0v"
[14:42:41] [L] PASV
[14:42:41] [L] 227 Entering Passive Mode (192,168,137,40,138,250)
[14:42:41] [L] Opening data connection IP: 192.168.137.40 PORT: 35578
[14:42:41] [L] MLSD
[14:42:41] [L] 550 Error
[14:42:42] [L] List Error
[14:42:42] [L] PASV
[14:42:42] [L] 227 Entering Passive Mode (192,168,137,40,138,250)
[14:42:42] [L] Opening data connection IP: 192.168.137.40 PORT: 35578
[14:42:42] [L] MLSD
[14:42:42] [L] 550 Error
[14:42:43] [L] List Error
[14:42:46] [L] CWD /dev_ntfs1v
[14:42:46] [L] 250 OK
[14:42:46] [L] PWD
[14:42:46] [L] 257 "/dev_ntfs1v"
[14:42:46] [L] PASV
[14:42:46] [L] 227 Entering Passive Mode (192,168,137,40,138,250)
[14:42:46] [L] Opening data connection IP: 192.168.137.40 PORT: 35578
[14:42:46] [L] MLSD
[14:42:46] [L] 550 Error
[14:42:47] [L] List Error
[14:42:47] [L] PASV
[14:42:47] [L] 227 Entering Passive Mode (192,168,137,40,138,250)
[14:42:47] [L] Opening data connection IP: 192.168.137.40 PORT: 35578
[14:42:47] [L] MLSD
[14:42:47] [L] 550 Error
[14:42:48] [L] List Error
[14:42:50] [L] CWD /dev_ntfs3v
[14:42:50] [L] 250 OK
[14:42:50] [L] PWD
[14:42:50] [L] 257 "/dev_ntfs3v"
[14:42:50] [L] PASV
[14:42:50] [L] 227 Entering Passive Mode (192,168,137,40,138,250)
[14:42:50] [L] Opening data connection IP: 192.168.137.40 PORT: 35578
[14:42:50] [L] MLSD
[14:42:50] [L] 550 Error
[14:42:51] [L] List Error
[14:42:51] [L] PASV
[14:42:51] [L] 227 Entering Passive Mode (192,168,137,40,138,250)
[14:42:51] [L] Opening data connection IP: 192.168.137.40 PORT: 35578
[14:42:51] [L] MLSD
[14:42:51] [L] 550 Error
[14:42:52] [L] List Error
[14:42:53] [L] CWD /dev_ntfs5v
[14:42:53] [L] 250 OK
[14:42:53] [L] PWD
[14:42:53] [L] 257 "/dev_ntfs5v"
[14:42:53] [L] PASV
[14:42:53] [L] 227 Entering Passive Mode (192,168,137,40,138,250)
[14:42:53] [L] Opening data connection IP: 192.168.137.40 PORT: 35578
[14:42:53] [L] MLSD
[14:42:53] [L] 550 Error
[14:42:54] [L] List Error
[14:42:54] [L] PASV
[14:42:54] [L] 227 Entering Passive Mode (192,168,137,40,138,250)
[14:42:54] [L] Opening data connection IP: 192.168.137.40 PORT: 35578
[14:42:54] [L] MLSD
[14:42:54] [L] 550 Error
[14:42:55] [L] List Error
[14:42:58] [L] CWD /dev_ntfs7v
[14:42:58] [L] 250 OK
[14:42:58] [L] PWD
[14:42:58] [L] 257 "/dev_ntfs7v"
[14:42:58] [L] PASV
[14:42:58] [L] 227 Entering Passive Mode (192,168,137,40,138,250)
[14:42:58] [L] Opening data connection IP: 192.168.137.40 PORT: 35578
[14:42:58] [L] MLSD
[14:42:58] [L] 550 Error
[14:42:59] [L] List Error
[14:42:59] [L] PASV

dev_ntfs0v-7v all failed.
 
@deank
Just tested the zip again 1h ago, have you changed it again since then?

1h ago t still would not display the contents.
On opening the ftp site the drive blinks, it gets mounted but there is still something wrong, hdd does not blink when you try to open dev_ntfs0v

Edit: nvm, it has changed, trying new build now.
 
I changed it 10 mins ago... it seems it fails at ps3ntfs_diropen... If you try it again it will show in the error message the exact path it tries to open - just post it back.
 
I changed it 10 mins ago... it seems it fails at ps3ntfs_diropen... If you try it again it will show in the error message the exact path it tries to open - just post it back.
For me it's worse than that, it won't even mount the ntfs drive.... It was ok with previous build but with this one there is no blinking at all...
 
@deank
I could just give you one of my ps3 to control remotely I suppose... Do you want me to pm you my ip address? I could temporarily open a ftp port and we could change webman's port to open the http server on something other than 80? Would that help you for testing?
You would have ftp to push webftp_server.sprx & test browsing ntfs, all you need is a web command to restart the console... You could be testing easily this way...
If the console froze, I will see it & restart it or you could notify me.... Not ideal but maybe easier....
 
Last edited:
@deank
i dunno if it will help or is directly related, but there are official funcions similar to those you have named.

that is what i have found in documents by incident (c/c++ standard libraries)
Code:
mbstowcs
size_t mbstowcs(wchar_t *restrict wcs, const char *restrict s, size_t n);

mbtowc
int mbtowc(wchar_t *restrict pwc, const char *restrict s, size_t n);

wcstombs
size_t wcstombs(char *restrict s, const wchar_t *restrict wcs, size_t n);

wctomb
int wctomb(char *s, wchar_t wchar);
 
@deank
i dunno if it will help or is directly related, but there are official funcions similar to those you have named.

that is what i have found in documents by incident (c/c++ standard libraries)
Code:
mbstowcs
size_t mbstowcs(wchar_t *restrict wcs, const char *restrict s, size_t n);

mbtowc
int mbtowc(wchar_t *restrict pwc, const char *restrict s, size_t n);

wcstombs
size_t wcstombs(char *restrict s, const wchar_t *restrict wcs, size_t n);

wctomb
int wctomb(char *s, wchar_t wchar);
Go back a few posts (start about #100!) you will see that in prx coding some standard library functions cannot be used due to restrictions. Instead we can use vsh exports for most of those missing functions, the rest must be reimplemented in full.
In elf programming it would not be an issue.
 
I'm glad to say that I achieved success :) The link with the test version is updated.
Everything works except showing the actual date/time of the files/folders on the NTFS drive.

Here is the link again: http://deanbg.com/webftp_server_test.zip

I performed some tests... Copying to the ntfs drive seems faster (~10MB/s on 100mbit network) than reading from it (~8MB/s).

Let me know what you think.

p.s. The main problems were: 1) ntfsLock uses thread locks and is not suitable for prx like webman and 2) ps3_io.c did not work with the strncmp function in wM and I had to use the exported one. The headbanging with these two took 18 hours alone :)

p.s.2 I just transferred 10GB ISO to the NTFS drive and then transferred it back to the PC and did "filecompare" - files are identical, which means the transfer is reliable. :)

p.s.3 This is the the project/source: http://deanbg.com/webMAN_1.45.zip
 
Last edited:
So we all have a wee bit done... Lol
You are right Zar, using a repo would be best.
I have one & you probably have one too...
Whoever... I don't mind...
i suppose you can make use of the palette registers within the webserver ftp test

as writing the string for date and time 13h

display at int 0x10
 
Last edited:
I updated the source a bit for cleaner look (and to remove the ugly 3-volume limit).

For any PRX to use the modified libntfs_ext it will require compiling ntfs/source/*.c and these declarations/functions in main.c (and of course linking with liballocator_export_stub.a and libstdc_export_stub.a)
Code:
#include "ntfs/include/ntfs.h"

extern int stdc_E1E83C65(const char *str1, const char *str2, size_t num);  // strncmp()
inline int strncmp(const char *str1, const char *str2, size_t num) {return stdc_E1E83C65(str1, str2, num);}

extern int stdc_3D85D6F8(const char *str1, const char *str2);  // strcmp()
inline int strcmp(const char *str1, const char *str2) {return stdc_3D85D6F8(str1, str2);}

extern size_t stdc_2F45D39C(const char *str);  // strlen()
inline size_t strlen(const char *str) {return stdc_2F45D39C(str);}

extern void *stdc_5909E3C4(void *str, int c, size_t n);  // memset()
inline void* memset(void *str, int c, size_t n) {return stdc_5909E3C4(str, c, n);}

extern void *stdc_831D70A5(void *dest, const void *src, size_t num);  // memcpy()
inline void* memcpy(void *dest, const void *src, size_t num) {return stdc_831D70A5(dest, src, num);}

inline int* _Geterrno(void){return stdc_44115DD0();}       // _Geterrno

extern void allocator_77A602DD(void *ptr);             // free()
inline void free(void *ptr) {allocator_77A602DD(ptr);}

extern void *allocator_759E0635(size_t size);           // malloc()
inline void* malloc (size_t size) {return allocator_759E0635(size);}

extern void *allocator_6137D196(size_t alignment, size_t size);   // memalign()
inline void* memalign(size_t alignment, size_t size) {return allocator_6137D196(alignment, size);}

extern void *allocator_A72A7595(size_t nitems, size_t size);   // calloc()
inline void* calloc(size_t nitems, size_t size) {return allocator_A72A7595(nitems, size);}

extern void *allocator_F7A14A22(void *ptr, size_t size);     // realloc()
inline void* realloc(void *ptr, size_t size) {return allocator_F7A14A22(ptr, size);}

extern void *stdc_5B162B7F(void *str1, const void *str2, size_t n); // memmove()
inline void* memmove(void *str1, const void *str2, size_t n) {return stdc_5B162B7F(str1, str2, n);}

extern char *stdc_FC0428A6(const char *s);             // strdup()
inline char* strdup(const char *s) {return stdc_FC0428A6(s);}

extern char *stdc_44796E5C(int errnum);  // strerror()
inline char* strerror(int errnum) {return stdc_44796E5C(errnum);}

extern double stdc_519EBB77(double x);  // floor()
inline double floor(double x) {return stdc_519EBB77(x);}

extern double stdc_21E6D304(double x);  // ceil()
inline double ceil(double x) {return stdc_21E6D304(x);}

extern time_t stdc_89F6F026(time_t *timer);  // time()
inline time_t time(time_t *timer) {return stdc_89F6F026(timer);}

extern size_t stdc_FCAC2E8E(wchar_t *dest, const char *src, size_t max);  // mbstowcs()
inline size_t mbstowcs(wchar_t *dest, const char *src, size_t max) {return stdc_FCAC2E8E(dest, src, max);}

extern size_t stdc_12A55FB7(wchar_t *restrict pwc, const char *restrict s, size_t n, mbstate_t *restrict ps); // mbrtowc
int mbtowc(wchar_t * restrict pwc, const char * restrict s, size_t n)
{
  static mbstate_t mbs;
  size_t rval;

  if (s == NULL) {
  memset(&mbs, 0, sizeof(mbs));
  return (0);
  }
  rval = stdc_12A55FB7(pwc, s, n, &mbs);
  if (rval == (size_t)-1 || rval == (size_t)-2)
  return (-1);
  return ((int)rval);
}

extern size_t stdc_B2702E15(char *pmb, wchar_t wc, mbstate_t *ps); // wcrtomb()
int wctomb(char *s, wchar_t wchar)
{
  static mbstate_t mbs;
  size_t rval;

  if (s == NULL) {
  memset(&mbs, 0, sizeof(mbs));
  return (0);
  }
  if ((rval = stdc_B2702E15(s, wchar, &mbs)) == (size_t)-1)
  return (-1);
  return ((int)rval);
}

I'll see if I can use this stage to add the new libntfs_ext driver to multiMAN this weekend. For webMAN it is impossible to link it as external library, but may be for mM it won't be an issue.
 
Last edited:
Tested it as well.
Transferred a 12gb JB folder back & forth between pc & external ntfs on ps3. It worked perfectly.
Very smooth.

@deank
What about making changes to rawseciso to make JB folder on ntfs a reality among other things?
Am not exactly asking you to do it but rather your opinion now that you are getting familiar with the lib & its use within prx ... Lol
 
Last edited:
My opinion is that JB format should be avoided if possible. NTFS and games in folder format - I don't think it will happen. Estwald already included a lot of stuff to make libntfs_ext a system driver (hooking the standard syscalls), but I think that for a vsh prx it will be a lot to ask.
 

Similar threads

Back
Top