summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2018-10-26 11:24:46 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2018-10-26 11:24:46 +0000
commitb2ba2474003fb42ff7821e49da76286d06e5f302 (patch)
treefc7a37f4fdcdfc1829b8043ec36a839fa3f3e05b /usr.sbin
parent953d63ab64c0dd5309d7844d9f81c7effe1bcc53 (diff)
I broke base images with my previous commit by missing a line.
The disk path wasn't updated so vmd tried to open the derived disk image for each base over and over again. OK ori@ mlarkin@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/vmd/config.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/vmd/config.c b/usr.sbin/vmd/config.c
index a749e3595b5..6e7ed279d6b 100644
--- a/usr.sbin/vmd/config.c
+++ b/usr.sbin/vmd/config.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: config.c,v 1.53 2018/10/19 10:12:39 reyk Exp $ */
+/* $OpenBSD: config.c,v 1.54 2018/10/26 11:24:45 reyk Exp $ */
/*
* Copyright (c) 2015 Reyk Floeter <reyk@openbsd.org>
@@ -354,7 +354,7 @@ config_setvm(struct privsep *ps, struct vmd_vm *vm, uint32_t peerid, uid_t uid)
*/
oflags = O_RDONLY|O_NONBLOCK;
aflags = R_OK;
- n = virtio_get_base(diskfds[i][j], base, sizeof base,
+ n = virtio_get_base(diskfds[i][j], base, sizeof(base),
vmc->vmc_disktypes[i], path);
if (n == 0)
break;
@@ -364,6 +364,7 @@ config_setvm(struct privsep *ps, struct vmd_vm *vm, uint32_t peerid, uid_t uid)
base, vcp->vcp_disks[i]);
goto fail;
}
+ (void)strlcpy(path, base, sizeof(path));
}
}