User`s guide
266
K
A
DAK
KwikNet Virtual File System
kvf_voladd kvf_voladd
kvf_voldel kvf_voldel
Purpose Add/Delete a Virtual File System Volume
Used by
n Task o ISP o Timer Procedure o Restart Procedure n Exit Procedure
Setup Prototype is in file KN_FILES.H.
#include "KN_LIB.H"
#include "KN_FILES.H"
int kvf_voladd(const struct knx_vfsvol *volume);
int kvf_voldel(const struct knx_vfsvol *volume);
Description Volume is pointer to a VFS volume description created by the VFS
Generator. The volume description is a public variable whose name is
given by the volume name assigned to the VFS volume by the VFS
Generator. The variable resides in one of your VFS Data Files.
Parameter volume identifies the VFS volume which you wish to add to
or delete from your Virtual File System.
Returns If successful, a value of 0 is returned.
On failure, a value of -1 is returned. Possible reasons for the error are as
follows:
A volume which has no files cannot be added to the VFS.
A volume which is not currently in the VFS cannot be deleted.
Example /* Add or remove a secondary VFS volume. */
/* The volume was created by the VFS Generator and was */
/* given the volume name my_vfs. */
#include "kn_lib.h"
#include "kn_files.h"
extern const struct knx_vfsvol my_vfs;
int my_volume(int operation)
{
if (operation)
return (kvf_voladd(&my_vfs));
else return (kvf_voldel(&my_vfs));
}