forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

LibHdd Problem?

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development
View previous topic :: View next topic  
Author Message
sincro



Joined: 27 Jan 2004
Posts: 25

PostPosted: Sun Jan 23, 2005 9:35 pm    Post subject: LibHdd Problem? Reply with quote

Hi to all, i have a little problem with libhdd.

When I try to open a file in pfs0 that not exist the debug return :

Code:
ps2fs: Warning: NULL buffer returned


Ok...if I try in a loop to open a file that not exist after same loop the iop freez :(

Code:
fd = fileXioDopen(HDDpath);
      num_hdd_files=0;
while((rv=fileXioDread(fd, &dirbuf)))
      {

      strcpy(filesname, (char *)&dirbuf.name);
         sprintf (HDDfiles[num_hdd_files],"%s",filesname);
         HDDstats[num_hdd_files]=dirbuf.stat.mode;
         if ((HDDstats[num_hdd_files] & FIO_S_IFDIR) || (HDDstats[num_hdd_files] & FIO_S_IFREG)) num_hdd_files++;
       
      if ((HDDstats[num_hdd_files] & FIO_S_IFDIR))
        {           
                 
               ret=fileXioOpen("pfs0:/ciao.txt", O_RDONLY, fileMode);
               fileXioClose(ret);
                  
      }
         if (num_hdd_files>MAX_ENTRY) break;

         }
      
   fileXioDclose(fd);


With the fioOpen theres no problem. How to solve this problem?

Help

Tnx
Back to top
View user's profile Send private message
sincro



Joined: 27 Jan 2004
Posts: 25

PostPosted: Mon Jan 24, 2005 12:08 am    Post subject: Reply with quote

I've solved with dopen suggested by Drakonite

tnx
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group