Modules/LVM - Fixed memory leak on cleanup
[tpg/acess2.git] / KernelLand / Modules / Storage / LVM / include / lvm.h
index 904a735..804843b 100644 (file)
 
 #include <acess.h>
 
-typedef int (*tLVM_ReadFcn)(void *, Uint64, size_t, void *);
-typedef int (*tLVM_WriteFcn)(void *, Uint64, size_t, const void *);
+typedef struct sLVM_VolType    tLVM_VolType;
 
-extern int     LVM_AddVolume(const char *Name, void *Ptr, size_t BlockSize, tLVM_ReadFcn Read, tLVM_WriteFcn Write);
+struct sLVM_VolType
+{
+       const char *Name;
+
+        int    (*Read)(void *, Uint64, size_t, void *);
+        int    (*Write)(void *, Uint64, size_t, const void *);
+       void    (*Cleanup)(void *);
+};
+
+
+extern void    *LVM_AddVolume(const tLVM_VolType *Type, const char *Name, void *Ptr, size_t BlockSize, size_t BlockCount);
+extern void    LVM_DelVolume(void *Handle);
 
 #endif
 

UCC git Repository :: git.ucc.asn.au