Better error management

This commit is contained in:
Andrea Mazzoleni 2011-03-18 22:38:11 +01:00
parent a30c93024a
commit f443a7f089
13 changed files with 272 additions and 138 deletions

View file

@ -34,27 +34,27 @@ int parity_create(const char* path, data_off_t size);
/**
* Opens an already existing parity file.
*/
int parity_open(int ret_on_error, const char* path);
int parity_open(const char* path);
/**
* Flushes the parity file in the disk.
*/
void parity_sync(const char* path, int f);
int parity_sync(const char* path, int f);
/**
* Closes the parity file.
*/
void parity_close(const char* path, int f);
int parity_close(const char* path, int f);
/**
* Read a block from the parity file.
*/
int parity_read(int ret_on_error, const char* parity_path, int parity_f, block_off_t pos, unsigned char* block_buffer, unsigned block_size);
int parity_read(const char* parity_path, int parity_f, block_off_t pos, unsigned char* block_buffer, unsigned block_size);
/**
* Writes a block in the parity file.
*/
void parity_write(const char* parity_path, int parity_f, block_off_t pos, unsigned char* block_buffer, unsigned block_size);
int parity_write(const char* parity_path, int parity_f, block_off_t pos, unsigned char* block_buffer, unsigned block_size);
#endif