ISFS_Read not returning buffer (HB)
#1

  1. heres my code:
         (src and dst are valid destinations("/shared2/wc24/misc.bin", "/misc.bin"), Exists returns x>=0)
  1. ISFS_Initialize();            
  1. s32 fd=ISFS_Open(src, ISFS_OPEN_READ); 
  1. s32 retr;            
  1. u8 *buffer;            
  1. if (Exists(fd)) {                
  1.    buffer=(u8*)memalign(32, 0x400);                
  1.    retr=ISFS_Read(fd, buffer, 0x400);                            
  1. }            
  1. else {                
  1.     return "I/O error.";            
  1. }            
  1. fatInitDefault();            
  1. ISFS_Close(fd);            
  1. std::ofstream bufo(dst, std::ios::binary);           
  1. bufo << buffer;            
  1. bufo.close();
Reply
#2
EDIT: Moved thread to appropriate sub forum.

Here's a list of ISFS (IOS) error returns you could use to see what the exact issue is on any ISFS call.

https://www.wiibrew.org/wiki//dev/fs Scroll down to /dev/fs error codes

Also a plain jane ISFS_Read call returns the amount of bytes read (dumped to memory). It should always match the 3rd arg/parameter of when you called ISFS_Read.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)