{
struct xen_boot_binary *next;
struct xen_boot_binary **prev;
- int is_hypervisor;
+ bool is_hypervisor;
grub_addr_t start;
grub_size_t size;
static grub_dl_t my_mod;
-static int loaded;
+static bool loaded;
static struct xen_boot_binary *xen_hypervisor;
static struct xen_boot_binary *module_head;
binary->cmdline, binary->cmdline_size);
}
- if (!binary->is_hypervisor)
+ if (binary->is_hypervisor == false)
grub_list_remove (GRUB_AS_LIST (binary));
grub_dprintf ("xen_loader",
static grub_err_t
xen_unload (void)
{
- loaded = 0;
+ loaded = false;
all_binaries_unload ();
grub_fdt_unload ();
grub_dl_unref (my_mod);
goto fail;
}
- if (!loaded)
+ if (loaded == false)
{
grub_error (GRUB_ERR_BAD_ARGUMENT,
N_("you need to load the Xen Hypervisor first"));
if (!module)
return grub_errno;
- module->is_hypervisor = 0;
+ module->is_hypervisor = false;
module->align = 4096;
grub_dprintf ("xen_loader", "Init module and node info\n");
if (!xen_hypervisor)
return grub_errno;
- xen_hypervisor->is_hypervisor = 1;
+ xen_hypervisor->is_hypervisor = true;
xen_hypervisor->align
= (grub_size_t) lh.pe_image_header.optional_header.section_alignment;
if (grub_errno == GRUB_ERR_NONE)
{
grub_loader_set (xen_boot, xen_unload, 0);
- loaded = 1;
+ loaded = true;
}
fail:
grub_file_close (file);
if (grub_errno != GRUB_ERR_NONE)
{
- loaded = 0;
+ loaded = false;
all_binaries_unload ();
grub_dl_unref (my_mod);
}