1234567891011121314151617181920212223242526272829303132333435 |
- #ifndef _DEVMAPPER_H
- #define _DEVMAPPER_H
- #include <linux/dm-ioctl.h>
- #include <unistd.h>
- class Devmapper {
- public:
- static int create(const char* name, const char* loopFile, const char* key,
- unsigned long numSectors, char* buffer, size_t len);
- static int destroy(const char* name);
- static int destroyAll();
- private:
- static void* _align(void* ptr, unsigned int a);
- static void ioctlInit(struct dm_ioctl* io, size_t data_size, const char* name, unsigned flags);
- };
- #endif
|