summaryrefslogtreecommitdiff
path: root/usr.sbin/ldomctl/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/ldomctl/config.c')
-rw-r--r--usr.sbin/ldomctl/config.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.sbin/ldomctl/config.c b/usr.sbin/ldomctl/config.c
index 05af736e9b6..7f6104ce3ab 100644
--- a/usr.sbin/ldomctl/config.c
+++ b/usr.sbin/ldomctl/config.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: config.c,v 1.32 2020/01/22 07:52:38 deraadt Exp $ */
+/* $OpenBSD: config.c,v 1.33 2020/02/20 20:38:44 kn Exp $ */
/*
* Copyright (c) 2012, 2018 Mark Kettenis
@@ -2557,7 +2557,8 @@ guest_add_memory(struct guest *guest, uint64_t base, uint64_t size)
}
void
-guest_add_vdisk(struct guest *guest, uint64_t id, const char *path)
+guest_add_vdisk(struct guest *guest, uint64_t id, const char *path,
+ const char *user_devalias)
{
struct guest *primary;
struct ldc_channel *lc;
@@ -2577,6 +2578,8 @@ guest_add_vdisk(struct guest *guest, uint64_t id, const char *path)
if (id == 0)
guest_add_devalias(guest, "disk", devpath);
guest_add_devalias(guest, devalias, devpath);
+ if (user_devalias != NULL)
+ guest_add_devalias(guest, user_devalias, devpath);
free(devalias);
free(devpath);
}
@@ -2849,7 +2852,8 @@ build_config(const char *filename, int noaction)
guest_add_memory(guest, -1, domain->memory);
i = 0;
SIMPLEQ_FOREACH(vdisk, &domain->vdisk_list, entry)
- guest_add_vdisk(guest, i++, vdisk->path);
+ guest_add_vdisk(guest, i++, vdisk->path,
+ vdisk->devalias);
i = 0;
SIMPLEQ_FOREACH(vnet, &domain->vnet_list, entry)
guest_add_vnetwork(guest, i++, vnet->mac_addr,