Changeset View
Changeset View
Standalone View
Standalone View
usr.sbin/bhyve/bhyverun.c
Show First 20 Lines • Show All 1,367 Lines • ▼ Show 20 Lines | if (mptgen) { | ||||||||
error = mptable_build(ctx, guest_ncpus); | error = mptable_build(ctx, guest_ncpus); | ||||||||
if (error) { | if (error) { | ||||||||
perror("error to build the guest tables"); | perror("error to build the guest tables"); | ||||||||
exit(4); | exit(4); | ||||||||
} | } | ||||||||
} | } | ||||||||
error = smbios_build(ctx); | error = smbios_build(ctx); | ||||||||
assert(error == 0); | if (error) | ||||||||
exit(4); | |||||||||
jhbUnsubmitted Not Done Inline Actions
jhb: | |||||||||
Not Done Inline Actions
jhb: | |||||||||
Done Inline ActionsPer style(9) when there is only 1 statement in a block you do not enclose it in { }, so this could become just: if (error) exit(4); rgrimes: Per style(9) when there is only 1 statement in a block you do not enclose it in { }, so this… | |||||||||
Not Done Inline ActionsFor the record, style(9) was amended several years ago to allow braces around single-line statements: Space after keywords (if, while, for, return, switch). Two styles of braces (‘{’ and ‘}’) are allowed for single line statements. Either they are used for all single statements, or they are used only where needed for clarity. Usage within a function should be consistent. Forever loops are done with for's, not while's. See https://reviews.freebsd.org/V3 / https://cgit.freebsd.org/src/commit/?id=abb14e5deda3 rpokala: For the record, style(9) was amended several years ago to allow braces around single-line… | |||||||||
if (acpi) { | if (acpi) { | ||||||||
error = acpi_build(ctx, guest_ncpus); | error = acpi_build(ctx, guest_ncpus); | ||||||||
assert(error == 0); | assert(error == 0); | ||||||||
Done Inline ActionsHmm, I wonder if we should also exit(4) here as well? and in all the other assert(error == 0) locations? me_jamesrm.com: Hmm, I wonder if we should also exit(4) here as well? and in all the other assert(error == 0)… | |||||||||
Done Inline ActionsSave that for another review :) grehan: Save that for another review :) | |||||||||
} | } | ||||||||
if (lpc_bootrom()) | if (lpc_bootrom()) | ||||||||
fwctl_init(); | fwctl_init(); | ||||||||
/* | /* | ||||||||
* Change the proc title to include the VM name. | * Change the proc title to include the VM name. | ||||||||
*/ | */ | ||||||||
▲ Show 20 Lines • Show All 54 Lines • Show Last 20 Lines |