Page 1 of 1

LibHdd Problem?

Posted: Sun Jan 23, 2005 9:35 pm
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

Posted: Mon Jan 24, 2005 12:08 am
by sincro
I've solved with dopen suggested by Drakonite

tnx