LibHdd Problem?

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
sincro
Posts: 25
Joined: Tue Jan 27, 2004 9:54 am

LibHdd Problem?

Post by sincro »

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: Select all

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: Select all

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
sincro
Posts: 25
Joined: Tue Jan 27, 2004 9:54 am

Post by sincro »

I've solved with dopen suggested by Drakonite

tnx
Post Reply