I need to check my disk for bad sectors irrespective of the filesystem on it. I can use dcheck from the command line and want to avoid using system/spawn APIs from my application.
If there is any alternative to system/spawn APIs, ps let me know.
Well you could use open on /dev/hd# and try reading each sector. There’s a read routine with the word “block” in the name that will get you around the 2Gig file limit.