Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177553181
D47031.1794700652.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
828 B
Referenced Files
None
Subscribers
None
D47031.1794700652.diff
View Options
diff --git a/usr.sbin/bhyvectl/bhyvectl.c b/usr.sbin/bhyvectl/bhyvectl.c
--- a/usr.sbin/bhyvectl/bhyvectl.c
+++ b/usr.sbin/bhyvectl/bhyvectl.c
@@ -388,22 +388,17 @@
if (vmname == NULL)
usage(opts);
- error = 0;
-
- if (!error && create)
- error = vm_create(vmname);
- if (!error) {
- ctx = vm_open(vmname);
- if (ctx == NULL) {
- fprintf(stderr,
- "vm_open: %s could not be opened: %s\n",
- vmname, strerror(errno));
- exit(1);
- }
- vcpu = vm_vcpu_open(ctx, vcpuid);
+ ctx = vm_openf(vmname, create ? VMMAPI_OPEN_CREATE : 0);
+ if (ctx == NULL) {
+ fprintf(stderr,
+ "vm_open: %s could not be opened: %s\n",
+ vmname, strerror(errno));
+ exit(1);
}
+ vcpu = vm_vcpu_open(ctx, vcpuid);
+ error = 0;
if (!error && memsize)
error = vm_setup_memory(ctx, memsize, VM_MMAP_ALL);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 14, 11:57 PM (8 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41734319
Default Alt Text
D47031.1794700652.diff (828 B)
Attached To
Mode
D47031: bhyvectl: Convert to use vm_openf()
Attached
Detach File
Event Timeline