Zachary Amsden wrote:
+void __init vmi_init(void)
+{
+ int romsize;
+
+ /*
+ * Setup optional callback functions if we found the VMI ROM
+ */
+ if (hypervisor_found) {
+ romsize = vmi_rom->romLength * 512;
+ if (VROMFunc(vmi_rom, VMI_CALL_Init)) {
+ printk(KERN_WARNING "VMI ROM failed to initialize\n");
+ hypervisor_found = 0;
+ } else {
+ memcpy(&__VMI_START, (char *)vmi_rom, romsize);
+ scan_builtin_annotations();
+ }
+ }
+ if (!vmi_rom)
+ printk(KERN_WARNING "VMI ROM not found"
+ " - falling back to native mode\n");
+ else if (!hypervisor_found)
+ printk(KERN_WARNING "VMI ROM version mismatch "
+ "(kernel requires version >= %d.%d) "
+ " - falling back to native mode\n",
+ VMI_API_REV_MAJOR, MIN_VMI_API_REV_MINOR);
+}
Minor nitpick.
The error logic here is somewhat confusing. If a VMI_CALL_Init results
in a failure, you end up with:
VMI ROM failed to initialize
VMI ROM version mismatch (kernel requires version >= 13.0) - falling
back to native mode
The later error is misleading as the version may actually match. The
nesting here probably could be simplified to.
Regards,
Anthony Liguori
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]