From 89a8ab94a19426065bad3a84eba4d75da35f123c Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Fri, 16 Jul 2010 19:18:31 +0000 Subject: [PATCH] Set the key attribute for filename for vcdrom devices git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1831 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/dev_handlers/scst_vdisk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index 1d66f9eb6..d597de5e3 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -3907,7 +3907,7 @@ static ssize_t vdev_sysfs_filename_show(struct kobject *kobj, pos = sprintf(buf, "%s\n", vdev_get_filename(virt_dev)); - if (virt_dev->dev->type != TYPE_ROM) + if ((virt_dev->filename != NULL) && (virt_dev->dev->type == TYPE_ROM)) pos += sprintf(&buf[pos], "%s\n", SCST_SYSFS_KEY_MARK); mutex_unlock(&virt_dev->vdev_sysfs_mutex);