summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2013-10-01 10:42:04 +0800
committerJeremy Kerr <jk@ozlabs.org>2013-10-01 12:51:55 +0800
commitb201464a18c990ea6df0f2878e532618d4936c53 (patch)
tree2c942759ba458f74d9b5a8a7071bfd8193bca733 /test
parentffc167572a9d56c52908aebefe62ba3e3e2a9cf8 (diff)
downloadtalos-petitboot-b201464a18c990ea6df0f2878e532618d4936c53.tar.gz
talos-petitboot-b201464a18c990ea6df0f2878e532618d4936c53.zip
discover: Allow for already-mounted devices
When we start the discover server, we may find that devices are already mounted. In this case, mount_device will fail, and we'll abort the parse. This change uses /proc/self/mounts to check if new devices are already mounted, and uses the existing mount point. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'test')
-rw-r--r--test/parser/utils.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/parser/utils.c b/test/parser/utils.c
index f693982..7af4df7 100644
--- a/test/parser/utils.c
+++ b/test/parser/utils.c
@@ -61,6 +61,7 @@ struct discover_device *test_create_device(struct parser_test *test,
dev->device->id = talloc_strdup(dev, name);
dev->device_path = talloc_asprintf(dev, "/dev/%s", name);
dev->mount_path = talloc_asprintf(dev, "/test/mount/%s", name);
+ dev->mounted = true;
return dev;
}
OpenPOWER on IntegriCloud