提交 b1b81efe 编写于 作者: O Osier Yang 提交者: Pavel Hrdina

util: Accept test data path for scsi device's sg_path

Commit 10c9ceff intended to introduce new argument for the
testing purpose, but it missed the similar changing of the
device's sg_path. The problem was hidden since my laptop has
the /dev/sg0 and /dev/sg1.  A later patch will modify the tests
accordingly.
Signed-off-by: NOsier Yang <jyang@redhat.com>
Reported-by: NPavel Hrdina <phrdina@redhat.com>
上级 fb321a00
......@@ -222,7 +222,8 @@ virSCSIDeviceNew(const char *sysfs_prefix,
if (virAsprintf(&dev->name, "%d:%d:%d:%d", dev->adapter,
dev->bus, dev->target, dev->unit) < 0 ||
virAsprintf(&dev->sg_path, "/dev/%s", sg) < 0)
virAsprintf(&dev->sg_path, "%s/%s",
sysfs_prefix ? sysfs_prefix : "/dev", sg) < 0)
goto cleanup;
if (!virFileExists(dev->sg_path)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册