diff options
author | Marcelo Araujo <araujo@FreeBSD.org> | 2018-06-14 01:28:55 +0000 |
---|---|---|
committer | Marcelo Araujo <araujo@FreeBSD.org> | 2018-06-14 01:28:55 +0000 |
commit | 23fe789d78f6f9ab3be63cb1843ac61203a943c6 (patch) | |
tree | f35eebeeea0fcd742977af1d51cd65d09f320106 /lib/libvmmapi | |
parent | 2ea5b0f54accc76bd06329daf8051dc6e4d6e2d2 (diff) | |
download | src-test2-23fe789d78f6f9ab3be63cb1843ac61203a943c6.tar.gz src-test2-23fe789d78f6f9ab3be63cb1843ac61203a943c6.zip |
Notes
Diffstat (limited to 'lib/libvmmapi')
-rw-r--r-- | lib/libvmmapi/vmmapi.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/libvmmapi/vmmapi.c b/lib/libvmmapi/vmmapi.c index cb19bc71b160..1d6f94b8b6db 100644 --- a/lib/libvmmapi/vmmapi.c +++ b/lib/libvmmapi/vmmapi.c @@ -85,19 +85,19 @@ struct vmctx { static int vm_device_open(const char *name) { - int fd, len; - char *vmfile; + int fd, len; + char *vmfile; len = strlen("/dev/vmm/") + strlen(name) + 1; vmfile = malloc(len); assert(vmfile != NULL); snprintf(vmfile, len, "/dev/vmm/%s", name); - /* Open the device file */ - fd = open(vmfile, O_RDWR, 0); + /* Open the device file */ + fd = open(vmfile, O_RDWR, 0); free(vmfile); - return (fd); + return (fd); } int @@ -876,7 +876,7 @@ vm_set_capability(struct vmctx *ctx, int vcpu, enum vm_cap_type cap, int val) vmcap.cpuid = vcpu; vmcap.captype = cap; vmcap.capval = val; - + return (ioctl(ctx->fd, VM_SET_CAPABILITY, &vmcap)); } @@ -1580,4 +1580,3 @@ vm_get_ioctls(size_t *len) *len = nitems(vm_ioctl_cmds); return (NULL); } - |