beautypg.com

Zilog file system apis – Zilog EZ80F91AZA User Manual

Page 14

background image

Zilog File System Overview

UM017914-1211

4

Zilog File System
User Manual

ctr = ZFSGetVolumeCount();

if(ctr <= 0)

{

// error in getting the volume count

return ;

}

// allocate memory for volume parameters

// (sizeof(ZFS_VOL_PARAMS_t) * number of volumes)

// and store it in pvol_params

printf("\nInitializing FileSystem, Please Wait...");

status = ZFSInit(pvol_params);

if(status != ZFSERR_SUCCESS)

{

printf("FAILED : %d", status);

ptmp_vol = pvol_params;

for(cnt = 0 ; cnt < status ; cnt ++, ptmp_vol++ )

{

printf("\n\nVolume Name: %s", ptmp_vol->vol_name);

printf("\nFormatting the volume: %s", ptmp_vol->vol_name);

status = ZFSFormat((INT8*) &ptmp_vol->vol_name[0]);

if(status != ZFSERR_SUCCESS)

{

printf("FAILED");

return;

}

else

printf("SUCCESS");

}

}

else

printf("DONE") ;

// Now call any Zilog File System APIs

// Create a directory

status = ZFSMkdir("EXTF:/","Dir.0");

if(status != ZFSERR_SUCCESS)

printf("New Directory is created");

else

printf("Unable to create a directory: %d", status);

:

:

}

Zilog File System APIs

The Zilog File System provides a number of standard APIs that execute different actions.
These APIs are briefly described in Table 1. For more detailed information about the Zilog

This manual is related to the following products: