Changeset View
Changeset View
Standalone View
Standalone View
usr.sbin/bhyveload/bhyveload.c
Context not available. | |||||
return (vm_set_desc(ctx, vcpu, reg, base, limit, access)); | return (vm_set_desc(ctx, vcpu, reg, base, limit, access)); | ||||
} | } | ||||
static int | |||||
cb_vm_get_unrestricted_guest(void* arg, int vcpu, int *retval) | |||||
{ | |||||
grehan: Minor style(9) - should be an empty line before the rreturn - see the routine above. | |||||
return (vm_get_capability(ctx, vcpu, | |||||
Done Inline ActionsMinor style(9) - continued lines should be indented by 4 spaces. grehan: Minor style(9) - continued lines should be indented by 4 spaces. | |||||
VM_CAP_UNRESTRICTED_GUEST, retval)); | |||||
} | |||||
static int | |||||
cb_vm_set_unrestricted_guest(void* arg, int vcpu, int val) | |||||
{ | |||||
int error, tmp; | |||||
Done Inline ActionsMinor style(9) - blank line between declarations and statement. grehan: Minor style(9) - blank line between declarations and statement. | |||||
Done Inline ActionsMinor style(9) - return expression should be enclosed in parens. grehan: Minor style(9) - return expression should be enclosed in parens. | |||||
if ((error = cb_vm_get_unrestricted_guest(arg, vcpu, &tmp))) | |||||
return (error); | |||||
return (vm_set_capability(ctx, vcpu, | |||||
VM_CAP_UNRESTRICTED_GUEST, val)); | |||||
} | |||||
static int | |||||
cb_vcpu_reset(void* arg, int vcpu) | |||||
Done Inline ActionsMinor style(9) - blank line needed before statement, and return expression should be in parens. grehan: Minor style(9) - blank line needed before statement, and return expression should be in parens. | |||||
{ | |||||
return (vcpu_reset(ctx, vcpu)); | |||||
} | |||||
static struct loader_callbacks cb = { | static struct loader_callbacks cb = { | ||||
.getc = cb_getc, | .getc = cb_getc, | ||||
.putc = cb_putc, | .putc = cb_putc, | ||||
Context not available. | |||||
/* Version 4 additions */ | /* Version 4 additions */ | ||||
.vm_set_register = cb_vm_set_register, | .vm_set_register = cb_vm_set_register, | ||||
.vm_set_desc = cb_vm_set_desc, | .vm_set_desc = cb_vm_set_desc, | ||||
/* Version 5 additions */ | |||||
.vm_set_unrestricted_guest = cb_vm_set_unrestricted_guest, | |||||
.vm_get_unrestricted_guest = cb_vm_get_unrestricted_guest, | |||||
.vcpu_reset = cb_vcpu_reset, | |||||
}; | }; | ||||
static int | static int | ||||
Context not available. | |||||
addenv("smbios.bios.vendor=BHYVE"); | addenv("smbios.bios.vendor=BHYVE"); | ||||
addenv("boot_serial=1"); | addenv("boot_serial=1"); | ||||
func(&cb, NULL, USERBOOT_VERSION_4, ndisks); | func(&cb, NULL, USERBOOT_VERSION_5, ndisks); | ||||
free(loader); | free(loader); | ||||
return (0); | return (0); | ||||
Context not available. |
Minor style(9) - should be an empty line before the rreturn - see the routine above.