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> init_vol<br />

Return Value<br />

Error Codes<br />

Notes<br />

scratchbuf Points to a buffer that is used temporarily by<br />

the pHILE+ file system manager during<br />

initialization. The scratch buffer must be the<br />

size of a pHILE+ block. The pHILE+<br />

Configuration Table parameter fc_logbsize<br />

(in the sys_conf.h file) determines this<br />

block size.<br />

This system call returns 0 on success or an error code on failure.<br />

Hex Mnemonic Description<br />

0x2003 E_BADVOL Inconsistent data on volume; volume<br />

corrupted.<br />

0x2005 E_VINITPAR Illegal parameters to init_vol().<br />

0x2008 E_MNTED Volume is already mounted.<br />

0x2021 E_ILLDEV Illegal device (exceeds maximum.)<br />

0x2025 E_IDN Illegal device name.<br />

1. All data stored on the volume is lost by execution of this call.<br />

2. The volume's media must have been properly hardware formatted before this<br />

call is executed.<br />

3. A mounted volume cannot be initialized.<br />

4. init_vol() can be used for the first initialization of a volume. It receives all<br />

the information it needs in its parameters.<br />

5. The pHILE+ file system manager stores the volume's label and time of<br />

initialization in the volume's rootblock, but it does not use this information. The<br />

user decides how to use this information, which can be examined by using<br />

read_vol() to read the rootblock (block 2) directly.<br />

6. The starting block of the bitmap also determines the starting block of the<br />

FLIST, since the FLIST immediately follows the bitmap.<br />

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

2

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

Saved successfully!

Ooh no, something went wrong!