Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

void  FSVol_CacheAssign (CPU_CHAR          *name_vol,

...

                         FS_VOL_CACHE_API  *p_cache_api,

...

                         void              *p_cache_data,

...

                         CPU_INT32U         size,
                         CPU_INT08U         pct_mgmt,
                         CPU_INT08U         pct_dir,
                         FS_FLAGS           mode,
                         FS_ERR            *p_err)

File

Called from

Code enabled by

fs_vol.c

Application

FS_CFG_CACHE_EN

...

1094114Assign cache to a volume.anchor11055831105583

Arguments

Anchor10941161094116name_vol Anchor11442001144200

Volume name.

...

p_cache_api Anchor11442071144207

Pointer to: (a) cache API to use; OR (b) NULL, if default cache API should be used.

Anchor10941181094118p_cache_data Anchor11442141144214

Pointer to cache data.

Anchor10941191094119size Anchor11442211144221

Size, in bytes, of cache buffer.

Anchor10941201094120pct_mgmtanchor11442281144228

Percent of cache buffer dedicated to management sectors.

...

pct_dir Anchor11442351144235

Percent of cache buffer dedicated to directory sectors.

Anchor10941221094122mode Anchor11442421144242

Cache mode

...

...

FS_VOL_CACHE_MODE_WR_THROUGH

...

...

FS_VOL_CACHE_MODE_WR_BACK

...

...

FS_VOL_CACHE_MODE_RD

Anchor11510191151019p_err Anchor11510201151020

Pointer to variable that will receive return error code from this function:

...

...

FS_ERR_NONE

...

...

Cache created.

...

classWebWorks_Indent_1

...

FS_ERR_NAME_NULL

...

classWebWorks_Indent_2

...

name_volpassed a NULL pointer.

...

...

FS_ERR_VOL_NOT_OPEN

...

classWebWorks_Indent_2

...

Volume not open.

...

...

FS_ERR_NULL_PTR

...

classWebWorks_Indent_2

...

p_cache_datapassed a NULL pointer.

...

classWebWorks_Indent_1

...

FS_ERR_CACHE_INVALID_MODE

...

...

classWebWorks_Indent_2

...

Mode specified invalid

...

...

FS_ERR_CACHE_INVALID_SEC_TYPE

...

classWebWorks_Indent_2

...

Sector type sepecified invalid.

...

...

FS_ERR_CACHE_TOO_SMALL

...

classWebWorks_Indent_2

...

Size specified too small for cache.

...

...

Returned Value

Anchor10941381094138None. Anchor11009691100969

Notes/Warnings

...

None.