06.08.2013 Views

pSOSystem System Calls - Read

pSOSystem System Calls - Read

pSOSystem System Calls - Read

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

pHILE+ <strong>System</strong> <strong>Calls</strong> verify_vol<br />

verify_vol() examines the following volume control structures:<br />

■ Root block<br />

■ Bitmap<br />

■ FLIST<br />

■ All directories<br />

■ All file indirect blocks<br />

■ All file index blocks<br />

verify_vol() stores a detailed description of the detected fault into a userprovided<br />

fault descriptor block (FDB) and then calls the user-provided function<br />

faultp(), described below.<br />

faultp()<br />

faultp() is called by verify_vol() without any parameters. faultp() is<br />

responsible for additional processing of the fault.<br />

verify_vol() calls faultp() with the following information:<br />

■ The type of fault<br />

■ A detailed description of the fault<br />

■ An indication of whether or not the fault is correctable<br />

faultp() performs its own check and returns a status code in the register<br />

supported by pHILE+, which is processor-specific. The register used on each<br />

processor family is specified in Target on page 2-128.<br />

The status code faultp() returns must be one of the following:<br />

Code Description<br />

0 Continue volume verification without correcting the fault.<br />

1 Correct fault and continue volume verification.<br />

2 Terminate volume verification.<br />

If status = 1 is returned, verify_vol() makes modifications to the volume, which<br />

correct the fault. In most cases, the obvious modification is made. Less obvious<br />

modifications are described in “Bad Blocks” on page 2-139. Note that status = 1<br />

<strong>pSO<strong>System</strong></strong> <strong>System</strong> <strong>Calls</strong> 2-131<br />

2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!