mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-18 03:01:26 +00:00
Prevent possible collisions between saved PR and mode pages backup files
From now on '.' is illegal character in SCST device names Reported-by Ken Raeburn <raeburn@permabit.com> git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5702 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -1353,8 +1353,18 @@ static int scst_check_device_name(const char *dev_name)
|
||||
PRINT_ERROR("Dev name %s contains illegal character '/'",
|
||||
dev_name);
|
||||
res = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* To prevent collision with saved PR and mode pages backup files */
|
||||
if (strchr(dev_name, '.') != NULL) {
|
||||
PRINT_ERROR("Dev name %s contains illegal character '.'",
|
||||
dev_name);
|
||||
res = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
out:
|
||||
TRACE_EXIT_RES(res);
|
||||
return res;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user