mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-21 12:41:26 +00:00
scst_vdisk: Check that "filename" is specified at most once
Signed-off-by: Bart Van Assche <bvanassche@acm.org> git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5255 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -4710,6 +4710,12 @@ static int vdev_parse_add_dev_params(struct scst_vdisk_dev *virt_dev,
|
||||
}
|
||||
|
||||
if (!strcasecmp("filename", p)) {
|
||||
if (virt_dev->filename) {
|
||||
PRINT_ERROR("%s specified more than once"
|
||||
" (device %s)", p, virt_dev->name);
|
||||
res = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
if (*pp != '/') {
|
||||
PRINT_ERROR("Filename %s must be global "
|
||||
"(device %s)", pp, virt_dev->name);
|
||||
|
||||
Reference in New Issue
Block a user