06.08.2013 Views

pSOSystem System Calls - Read

pSOSystem System Calls - Read

pSOSystem System Calls - Read

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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

The contents of the verify_vol_params fields are as follows:<br />

pb_dataptr Points to a work area required by verify_vol().<br />

The size of this work area (in bytes) is given by the<br />

formula:<br />

96 + (4 * vsize) + (16 * nfd) + (38 * maxdepth)<br />

where vsize is the size of the volume in blocks; nfd is<br />

the number of file descriptors specified when the<br />

volume was initialized; and maxdepth is the<br />

maximum depth of the directory tree (it should be<br />

equal to pb_maxdepth, below.) For example, on a<br />

volume with:<br />

vsize = 5000 blocks<br />

nfd = 100 entries<br />

maxdepth = 5 levels<br />

a total of 96 + (4 * 5000) + (16 * 100) + (38 * 5) =<br />

21886 bytes would be required. This work area can<br />

be statically allocated, or it can be dynamically<br />

allocated by a pSOS+ rn_getseg() call.<br />

pb_datalen The size (in bytes) of the work area pointed to by<br />

pb_dataptr. The verify_vol() call uses this<br />

entry to confirm that the work area is large enough.<br />

pb_maxdepth The maximum depth of the volume’s directory tree. If<br />

any branch of the directory exceeds this depth,<br />

verify_vol() terminates and returns an error<br />

code to the calling task. The minimum value allowed<br />

is 1, which indicates a flat directory (i.e., one<br />

containing no subdirectories).<br />

pb_fdbptr Points to a fault descriptor block (FDB) in the caller's<br />

memory area. When a fault is detected,<br />

verify_vol() places a detailed description of the<br />

fault into the FDB. The FDB format is described on<br />

page 2-132.<br />

pb_faultp Points to the user-provided faultp() procedure<br />

that is called each time verify_vol() detects a<br />

fault. faultp() is responsible for processing the<br />

fault. Refer to “faultp()” on page 2-131 for more<br />

details.<br />

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

2

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

Saved successfully!

Ooh no, something went wrong!