sofs19
0.1
FUSE based file system
|
Access to disk blocks at raw level. More...
Functions | |
void | soOpenRawDisk (const char *devname, uint32_t *np=NULL) |
Open the storage device. More... | |
void | soCloseRawDisk (void) |
Close the storage device. More... | |
void | soReadRawBlock (uint32_t n, void *buf) |
Read a block of data from the storage device. More... | |
void | soWriteRawBlock (uint32_t n, void *buf) |
Write a block of data from the storage device. More... | |
Access to disk blocks at raw level.
void sofs19::soOpenRawDisk | ( | const char * | devname, |
uint32_t * | np = NULL |
||
) |
Open the storage device.
A communication channel is established with the storage device. It is supposed that no communication channel was previously established. The storage file must exist and have a size multiple of the block size.
[in] | devname | absolute path to the Linux file that simulates the storage device |
[out] | np | if not null, pointer to a location where the number of blocks of the device is to be stored |
void sofs19::soCloseRawDisk | ( | void | ) |
Close the storage device.
The communication channel previously established with the storage device is closed.
void sofs19::soReadRawBlock | ( | uint32_t | n, |
void * | buf | ||
) |
Read a block of data from the storage device.
[in] | n | physical number of the data block to be read from |
[out] | buf | pointer to the buffer where the data must be read into |
void sofs19::soWriteRawBlock | ( | uint32_t | n, |
void * | buf | ||
) |
Write a block of data from the storage device.
[in] | n | physical number of the block to be written into |
[in] | buf | pointer to the buffer containing the data to be written from |