mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-04 13:50:09 -05:00
Validate logical disk names in configuration parsing to ensure compatibility with snapraid-daemon
This commit is contained in:
parent
18a95e14a6
commit
ecef1944d5
3 changed files with 129 additions and 0 deletions
|
|
@ -27,6 +27,18 @@ const char* lev_name(unsigned level);
|
|||
*/
|
||||
const char* lev_config_name(unsigned level);
|
||||
|
||||
/**
|
||||
* Maximum byte length of a logical disk name.
|
||||
*/
|
||||
#define DISK_NAME_MAX 127
|
||||
|
||||
/**
|
||||
* Validate a logical disk name.
|
||||
*
|
||||
* Returns 0 if valid, or a static string error reason if invalid.
|
||||
*/
|
||||
const char* disk_name_invalid_reason(const char* name);
|
||||
|
||||
/****************************************************************************/
|
||||
/* state */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue