osx - looking for more info on EIO error returned by readdir_r () on Mac OS X -


On Mac OS X 10.6.8, some code that calls readdir_r () ever -At one gets the I / O error returned by 5 (EIO) I have seen it only a few times, always on external USB drive Every time I have seen it, if I send the CD in the original direction and do a ls then I see all the files. And, if I run the C program again that looks at the error, then it will be fine.

On some platforms, when an error occurs like an EIO, you can say anything that gives you more detailed error information (for example, MPE / Hperrmsg on IX, which reaches the error stack per process). Is something similar to OS X?

I think that I am assuming that the error false

  i = readdir_r (dirp, & amp;; stiff, & amp; ; Dire_ptr); Save_errno = errno; If (i) {if (i == EACCES) ... and (my_perror (save_errno, "readdir_r failed:"); espout4 ("readdir_r% s returned; errno =% s, dire_ptr =% s; parent =% s \ N ", num64 (i), num64 (save_errno), fmt_p (dire_ptr), parent_dir); espout1 (" (error: readdir_r here failed, error% s) \ n ", num64 (save_errno));}} < / Code> 

update, a week later ...

I determined That the combo of Macley Case (Model G-S 350 SU) and Western Digital Drive was the cause of small problems. I saw that the WD SATA connector was just like Macley Socket It's OK to use a seagate drive with the case, and it was OK to use a WD drive in a different case

Of course, I still get better / more detailed error information in my programs I want to be able to do this :)


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -