libntfs_ext library compilation with cellsdk

I had already performed this test with a series of new web commands about 10 days ago. I can already tell you WMM works perfectly fine with just a few simple ntfs functions. I tested these functions ok with wMM 1.45.08 Full. (only 1 hdd with 1 partition so no worries with memory issues for these tests)

Ah, I was not aware that webMAN MOD already supports NTFS access... Then there is no need to add it to webMAN I guess.
 
Ah, I was not aware that webMAN MOD already supports NTFS access... Then there is no need to add it to webMAN I guess.
Nope. I just tested the library with it by simply adding a few test calls as web commands. I never added full support to wMM.
My goal was to make sure the library was working with wMM because ultimately being able to bring full ntfs support to wMM was really what mattered to me... Lol
 
Did you use the hack with changing the export stub name or implemented the functions that didn't link correctly by using the exported libraries by mysis.
 
Well :) you could have mentioned this so I wouldn't waste few nights doing it from scratch.

Not all exports are defined in the stdc.h... I don't know what other library would have the multibyte/string conversion functions (or at least mbsinit)..

If you have the proper exports for these it will be much appreciated:
mbrtowc
mbsinit
mbsrtowcs
wcrtomb
 
Well :) you could have mentioned this so I wouldn't waste few nights doing it from scratch.

Not all exports are defined in the stdc.h... I don't know what other library would have the multibyte/string conversion functions (or at least mbsinit)..
Sorry... I should have mentioned it.

mbsinit? Maybe libiconv?
Btw I am not sure that this stdc.h is complete, I never tried to check & never got confirmation from @mysis.
 
Last edited:
Well :) you could have mentioned this so I wouldn't waste few nights doing it from scratch.

Not all exports are defined in the stdc.h... I don't know what other library would have the multibyte/string conversion functions (or at least mbsinit)..

If you have the proper exports for these it will be much appreciated:
mbrtowc
mbsinit
mbsrtowcs
wcrtomb
The ones commented out in stdc.h are not the proper exports ?
http://www.psdevwiki.com/ps3/VSH_Exports#stdc

At least for mbrtowc and wcrtomb. The other ones are missing.
 
The ones commented out in stdc.h are not the proper exports ?
http://www.psdevwiki.com/ps3/VSH_Exports#stdc

At least for mbrtowc and wcrtomb. The other ones are missing.
They are commented so they don't take over in the project. If you define these, they will be used instead of the original implementation.
That can lead to all sorts of issues depending on which function it is... Try uncommenting a few functions that are used in the project you will see, you will have to tweak the code here and there iirc.

Those 2 exports already are in stdc.h

extern size_t stdc_12A55FB7(wchar_t *restrict pwc, const char *restrict s, size_t n, mbstate_t *restrict ps); // mbrtowc
#define mbrtowc stdc_12A55FB7

extern size_t stdc_B2702E15(char *pmb, wchar_t wc, mbstate_t *ps); // wcrtomb()
#define wcrtomb stdc_B2702E15

I dunno about the 2 others though..
There is mbstowcs but not mbsrtowcs...
mbsinit isn't in the list either...
 
Last edited:
I put all stdc exports of vsh in my header, redefined or not, unfortunately not all is here. Other files like the dbg sys agent exports more: :(
iRRpchn.png
 
That's bad news..
It does not help us at all..
Looks like those missing ones might need to be fully implemented then unless we find another lib... Arghh
lol

Last year I remember I looked into libiconv... If I am not mistaken it had everything that I needed for multi byte string handling... If it did then those 2 functions should be there also.
Also isn't libiconv already included in ps3 sdk?
 
Last edited:
Ok, no idea what is needed here, no plan from this driver. multi-byte stings? Mean this normal string convert? What is with lib lion?
It is exported by vsh in lib sdk:
Code:
////////////////////////////////////////////////////////////////////////
// lion
extern L10nResult sdk_060EE3B2(const uint8_t jis[],      // JISstoUTF8s()
                               size_t *jis_len,
                               uint8_t utf8[],
                               size_t *utf8_len);
#define JISstoUTF8s sdk_060EE3B2

extern int sdk_1906CE6B(const uint8_t str[],             // jstrnchk()
                        size_t len);          
#define jstrnchk sdk_1906CE6B

extern uint16_t sdk_24FD32A9(const uint16_t c);          // sjishan2zen()
#define sjishan2zen sdk_24FD32A9

extern L10nResult sdk_2AD091C6(const uint16_t ucs2[],    // UCS2stoUTF8s()
                               size_t *ucs2_len,
                               uint8_t utf8[],
                               size_t *utf8_len);
#define UCS2stoUTF8s sdk_2AD091C6

extern L10nResult sdk_2B84030C(const uint8_t euckr[],    // EUCKRstoUTF8s()
                               size_t *euckr_len,
                               uint8_t utf8[],
                               size_t *utf8_len);
#define EUCKRstoUTF8s sdk_2B84030C
......
Is this we talk about?
 
Well it compiled just fine after restoring the changes in unistr.c. :) I'll add directory listing and will ask someone to test it later.

Here are all the exported functions that are needed (only for kernel PRX/modules with libntfs_ext):

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

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

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

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

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

extern void *allocator_F7A14A22(void *ptr, size_t size);     // realloc()
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()
void* memmove(void *str1, const void *str2, size_t n) {return stdc_5B162B7F(str1, str2, n);}

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

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

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

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

extern time_t stdc_89F6F026(time_t *timer);  // time()
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()
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);
}
 
Last edited:
Can someone redownload the test version (http://deanbg.com/webftp_server_test.zip) and test if it works (only folder listing).
I added two predefined mount names /dev_ntfs0v and /dev_ntfs1v. If your ntfs hdd doesn't blink when you access these you can try manual path /dev_ntfs2v to /dev_ntfs7v. Also custom command "SITE NTFS" will make it rescan for devices. This is just a simple test to see if webMAN can at least access the files on the ntfs drive.
 
Can someone redownload the test version (http://deanbg.com/webftp_server_test.zip) and test if it works (only folder listing).
I added two predefined mount names /dev_ntfs0v and /dev_ntfs1v. If your ntfs hdd doesn't blink when you access these you can try manual path /dev_ntfs2v to /dev_ntfs7v. Also custom command "SITE NTFS" will make it rescan for devices. This is just a simple test to see if webMAN can at least access the files on the ntfs drive.

It fails when trying to retrieve ntfs contents. Error 550. Tried other dev_ntfsxv up to 7. Same error.
SITE NTFS Cmd makes the drive blink.
Here is the log
Code:
2017-01-18 19:26:09 7560 1 Status: Connecting to 192.168.0.45:21... 2017-01-18 19:26:09 7560 1 Status: Connection established, waiting for welcome message... 2017-01-18 19:26:09 7560 1 Response: 220-VSH ftpd 2017-01-18 19:26:09 7560 1 Response: 220 webMAN ftpd 1.45n [NTFS:1] 2017-01-18 19:26:09 7560 1 Command: AUTH TLS 2017-01-18 19:26:09 7560 1 Response: 530 Error 2017-01-18 19:26:09 7560 1 Command: AUTH SSL 2017-01-18 19:26:09 7560 1 Response: 530 Error 2017-01-18 19:26:09 7560 1 Status: Insecure server, it does not support FTP over TLS. 2017-01-18 19:26:09 7560 1 Command: USER anonymous 2017-01-18 19:26:09 7560 1 Response: 331 OK 2017-01-18 19:26:09 7560 1 Command: PASS ************** 2017-01-18 19:26:09 7560 1 Response: 230 OK 2017-01-18 19:26:09 7560 1 Status: Server does not support non-ASCII characters. 2017-01-18 19:26:09 7560 1 Status: Logged in 2017-01-18 19:26:09 7560 1 Status: Retrieving directory listing of "/"... 2017-01-18 19:26:09 7560 1 Command: CWD / 2017-01-18 19:26:09 7560 1 Response: 250 OK 2017-01-18 19:26:09 7560 1 Command: PWD 2017-01-18 19:26:09 7560 1 Response: 257 "/" 2017-01-18 19:26:09 7560 1 Command: TYPE I 2017-01-18 19:26:09 7560 1 Response: 200 TYPE OK 2017-01-18 19:26:09 7560 1 Command: PASV 2017-01-18 19:26:09 7560 1 Response: 227 Entering Passive Mode (192,168,0,45,176,114) 2017-01-18 19:26:09 7560 1 Command: MLSD 2017-01-18 19:26:09 7560 1 Response: 150 OK 2017-01-18 19:26:09 7560 1 Response: 226 OK 2017-01-18 19:26:09 7560 1 Status: Directory listing of "/" successful 2017-01-18 19:26:11 7560 1 Status: Retrieving directory listing of "/dev_ntfs0v"... 2017-01-18 19:26:11 7560 1 Command: CWD dev_ntfs0v 2017-01-18 19:26:11 7560 1 Response: 550 Error 2017-01-18 19:26:11 7560 1 Error: Failed to retrieve directory listing 2017-01-18 19:26:13 7560 1 Status: Retrieving directory listing of "/dev_ntfs1v"... 2017-01-18 19:26:13 7560 1 Command: CWD / 2017-01-18 19:26:13 7560 1 Response: 250 OK 2017-01-18 19:26:13 7560 1 Command: CWD dev_ntfs1v 2017-01-18 19:26:13 7560 1 Response: 550 Error 2017-01-18 19:26:13 7560 1 Error: Failed to retrieve directory listing 2017-01-18 19:26:16 7560 1 Status: Retrieving directory listing of "/dev_ntfs1v"... 2017-01-18 19:26:16 7560 1 Command: CWD / 2017-01-18 19:26:16 7560 1 Response: 250 OK 2017-01-18 19:26:16 7560 1 Command: CWD dev_ntfs1v 2017-01-18 19:26:16 7560 1 Response: 550 Error 2017-01-18 19:26:16 7560 1 Error: Failed to retrieve directory listing 2017-01-18 19:26:18 7560 1 Status: Retrieving directory listing of "/dev_ntfs0v"... 2017-01-18 19:26:18 7560 1 Command: CWD / 2017-01-18 19:26:18 7560 1 Response: 250 OK 2017-01-18 19:26:18 7560 1 Command: CWD dev_ntfs0v 2017-01-18 19:26:18 7560 1 Response: 550 Error 2017-01-18 19:26:18 7560 1 Error: Failed to retrieve directory listing 2017-01-18 19:26:19 7560 1 Status: Retrieving directory listing of "/dev_hdd0"... 2017-01-18 19:26:19 7560 1 Command: CWD / 2017-01-18 19:26:19 7560 1 Response: 250 OK 2017-01-18 19:26:19 7560 1 Command: CWD dev_hdd0 2017-01-18 19:26:19 7560 1 Response: 250 OK 2017-01-18 19:26:19 7560 1 Command: PWD 2017-01-18 19:26:19 7560 1 Response: 257 "/dev_hdd0" 2017-01-18 19:26:19 7560 1 Command: PASV 2017-01-18 19:26:19 7560 1 Response: 227 Entering Passive Mode (192,168,0,45,176,114) 2017-01-18 19:26:19 7560 1 Command: MLSD 2017-01-18 19:26:19 7560 1 Response: 150 OK 2017-01-18 19:26:20 7560 1 Response: 226 [/dev_hdd0] [ 698308 MB free ] 2017-01-18 19:26:20 7560 1 Status: Directory listing of "/dev_hdd0" successful
ab9f11adff614eae1abe577a5c3ae37f.jpg
 

Similar threads

Back
Top