Merge pull request #752 from Ostrokrzew/special_devs

Allow to add special deviced as cores to the cache
This commit is contained in:
Robert Baldyga 2021-04-09 07:33:14 +02:00 committed by GitHub
commit 1cec062f67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -626,7 +626,13 @@ static bool is_dev_link_whitelisted(const char* path)
{
regex_t regex;
int result;
static const char* const whitelist[] = {"/dev/cas[0-9]\\+-[0-9]\\+$"};
static const char* const whitelist[] = {
"/dev/cas[0-9]\\+-[0-9]\\+$",
"/dev/cas[0-9]\\+-[0-9]\\+p[0-9]\\+$",
"/dev/ram[0-9]\\+$",
"/dev/ram[0-9]\\+p[0-9]\\+$",
"/dev/nullb[0-9]\\+$"
};
static const unsigned count = ARRAY_SIZE(whitelist);
size_t i;