mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-21 07:26:29 -05:00
Add the fix command
Split in various files Add --force switch Add --start switch
This commit is contained in:
parent
8e953adb27
commit
4bd4f9dd79
16 changed files with 2335 additions and 1532 deletions
19
util.h
19
util.h
|
|
@ -15,6 +15,9 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __UTIL_H
|
||||
#define __UTIL_H
|
||||
|
||||
/****************************************************************************/
|
||||
/* string */
|
||||
|
||||
|
|
@ -168,3 +171,19 @@ static inline char* strdechex(void* void_data, unsigned data_len, char* str)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
/* memory */
|
||||
|
||||
/**
|
||||
* Safe malloc.
|
||||
* If no memory is available, it aborts.
|
||||
*/
|
||||
void* malloc_nofail(size_t size);
|
||||
|
||||
/**
|
||||
* Xor two memory blocks.
|
||||
*/
|
||||
void memxor(unsigned char* xor, const unsigned char* block, unsigned size);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue