From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1XVjir-00084q-E4 for mharc-grub-devel@gnu.org; Sun, 21 Sep 2014 12:10:49 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35988) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVjig-00084e-FB for grub-devel@gnu.org; Sun, 21 Sep 2014 12:10:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XVjiW-0006nL-Vi for grub-devel@gnu.org; Sun, 21 Sep 2014 12:10:38 -0400 Received: from mail-we0-x22b.google.com ([2a00:1450:400c:c03::22b]:36565) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVjiW-0006lt-FF for grub-devel@gnu.org; Sun, 21 Sep 2014 12:10:28 -0400 Received: by mail-we0-f171.google.com with SMTP id k48so1788975wev.30 for ; Sun, 21 Sep 2014 09:10:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; bh=Oz4Q1rbCNqp4DJqF91fHR68IhxHRROg5o9sSheU/dQA=; b=vn5p50cHPkBHt+KXv5uCRPYyjaEJTZWNNNS+xhX2lIg1pK6g1n/W/ICVNgvK1A/ncq YIKpTG9mBy5lwdYcU7HS6eLu9PwqJDn0kWLz67EO71hpsFxDACuksDiLuBJzo1c3O7/Q zMsYkk1iQ0NIvLAKDYx67Evsljm0pSkKosCUJRMiF08GiOrYHqmXWRvEUinQ8/3lXjIL 8bg3jLoHHifVQ+btGOB/iSuoVDbGhgqCV+s0+fy8Io5UeiLU25Gm7hciLm6EEsqBV9Kb meWQ+Jg/smul34Xmib2Bz4S9wS9yyo36RSBe1VuGZZu8LVHYAvINVi96qGvR/EG1wfZZ 3DLA== X-Received: by 10.194.58.148 with SMTP id r20mr15194574wjq.66.1411315822638; Sun, 21 Sep 2014 09:10:22 -0700 (PDT) Received: from [192.168.42.4] (160-228.197-178.cust.bluewin.ch. [178.197.228.160]) by mx.google.com with ESMTPSA id g6sm9017831wjf.13.2014.09.21.09.10.18 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 21 Sep 2014 09:10:21 -0700 (PDT) Message-ID: <541EF869.3090704@gmail.com> Date: Sun, 21 Sep 2014 18:10:17 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.0 MIME-Version: 1.0 To: The development of GNU GRUB Subject: Re: [PATCH] cleanup: grub_cpu_to_XXX_compile_time for constants References: <1401808055-9678-1-git-send-email-arvidjaar@gmail.com> In-Reply-To: <1401808055-9678-1-git-send-email-arvidjaar@gmail.com> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="aFBQlXMjcdg4baQcMtREAdWQrnJ9OUxlM" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c03::22b X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Sep 2014 16:10:47 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --aFBQlXMjcdg4baQcMtREAdWQrnJ9OUxlM Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Go ahead. On 03.06.2014 17:07, Andrey Borzenkov wrote: > This tries to catch all cases where grub_cpu_to_XXX was used for consta= nt > expressions (including sizeof). >=20 > --- > grub-core/bus/usb/ehci.c | 44 ++++++++++++++++++++------------= -------- > grub-core/bus/usb/ohci.c | 8 ++++---- > grub-core/commands/gptsync.c | 6 +++--- > grub-core/disk/scsi.c | 2 +- > grub-core/disk/usbms.c | 4 ++-- > grub-core/fs/hfs.c | 2 +- > grub-core/fs/reiserfs.c | 12 +++++------ > grub-core/lib/fdt.c | 12 +++++------ > grub-core/loader/i386/linux.c | 2 +- > grub-core/loader/i386/pc/linux.c | 20 +++++++++--------- > grub-core/loader/i386/xen_file.c | 4 ++-- > grub-core/net/arp.c | 4 ++-- > grub-core/net/bootp.c | 4 ++-- > grub-core/net/ip.c | 2 +- > grub-core/net/net.c | 2 +- > grub-core/net/tftp.c | 8 ++++---- > grub-core/partmap/acorn.c | 4 ++-- > grub-core/partmap/bsdlabel.c | 2 +- > grub-core/partmap/gpt.c | 2 +- > grub-core/partmap/msdos.c | 4 ++-- > grub-core/tests/video_checksum.c | 6 +++--- > util/grub-mkfont.c | 4 ++-- > util/grub-mklayout.c | 2 +- > util/mkimage.c | 8 ++++---- > 24 files changed, 84 insertions(+), 84 deletions(-) >=20 > diff --git a/grub-core/bus/usb/ehci.c b/grub-core/bus/usb/ehci.c > index c0feefa..8ece400 100644 > --- a/grub-core/bus/usb/ehci.c > +++ b/grub-core/bus/usb/ehci.c > @@ -670,23 +670,23 @@ grub_ehci_pci_iter (grub_pci_device_t dev, grub_p= ci_id_t pciid, > for (i =3D 0; i < (GRUB_EHCI_N_TD - 1); i++) > { > e->td_virt[i].link_td =3D e->td_phys + (i + 1) * sizeof (struct = grub_ehci_td); > - e->td_virt[i].next_td =3D grub_cpu_to_le32 (GRUB_EHCI_TERMINATE)= ; > - e->td_virt[i].alt_next_td =3D grub_cpu_to_le32 (GRUB_EHCI_TERMIN= ATE); > + e->td_virt[i].next_td =3D grub_cpu_to_le32_compile_time (GRUB_EH= CI_TERMINATE); > + e->td_virt[i].alt_next_td =3D grub_cpu_to_le32_compile_time (GRU= B_EHCI_TERMINATE); > } > e->td_virt[GRUB_EHCI_N_TD - 1].next_td =3D > - grub_cpu_to_le32 (GRUB_EHCI_TERMINATE); > + grub_cpu_to_le32_compile_time (GRUB_EHCI_TERMINATE); > e->td_virt[GRUB_EHCI_N_TD - 1].alt_next_td =3D > - grub_cpu_to_le32 (GRUB_EHCI_TERMINATE); > + grub_cpu_to_le32_compile_time (GRUB_EHCI_TERMINATE); > e->tdfree_virt =3D e->td_virt; > /* Set Terminate in first QH, which is used in framelist */ > - e->qh_virt[0].qh_hptr =3D grub_cpu_to_le32 (GRUB_EHCI_TERMINATE | GR= UB_EHCI_HPTR_TYPE_QH); > - e->qh_virt[0].td_overlay.next_td =3D grub_cpu_to_le32 (GRUB_EHCI_TER= MINATE); > + e->qh_virt[0].qh_hptr =3D grub_cpu_to_le32_compile_time (GRUB_EHCI_T= ERMINATE | GRUB_EHCI_HPTR_TYPE_QH); > + e->qh_virt[0].td_overlay.next_td =3D grub_cpu_to_le32_compile_time (= GRUB_EHCI_TERMINATE); > e->qh_virt[0].td_overlay.alt_next_td =3D > - grub_cpu_to_le32 (GRUB_EHCI_TERMINATE); > + grub_cpu_to_le32_compile_time (GRUB_EHCI_TERMINATE); > /* Also set Halted bit in token */ > - e->qh_virt[0].td_overlay.token =3D grub_cpu_to_le32 (GRUB_EHCI_STATU= S_HALTED); > + e->qh_virt[0].td_overlay.token =3D grub_cpu_to_le32_compile_time (GR= UB_EHCI_STATUS_HALTED); > /* Set the H bit in first QH used for AL */ > - e->qh_virt[1].ep_char =3D grub_cpu_to_le32 (GRUB_EHCI_H); > + e->qh_virt[1].ep_char =3D grub_cpu_to_le32_compile_time (GRUB_EHCI_H= ); > /* Set Terminate into TD in rest of QHs and set horizontal link > * pointer to itself - these QHs will be used for asynchronous > * schedule and they should have valid value in horiz. link */ > @@ -697,12 +697,12 @@ grub_ehci_pci_iter (grub_pci_device_t dev, grub_p= ci_id_t pciid, > e->qh_chunk) & > GRUB_EHCI_POINTER_MASK) | GRUB_EHCI_HPTR_TYPE_QH); > e->qh_virt[i].td_overlay.next_td =3D > - grub_cpu_to_le32 (GRUB_EHCI_TERMINATE); > + grub_cpu_to_le32_compile_time (GRUB_EHCI_TERMINATE); > e->qh_virt[i].td_overlay.alt_next_td =3D > - grub_cpu_to_le32 (GRUB_EHCI_TERMINATE); > + grub_cpu_to_le32_compile_time (GRUB_EHCI_TERMINATE); > /* Also set Halted bit in token */ > e->qh_virt[i].td_overlay.token =3D > - grub_cpu_to_le32 (GRUB_EHCI_STATUS_HALTED); > + grub_cpu_to_le32_compile_time (GRUB_EHCI_STATUS_HALTED); > } > =20 > /* Note: QH 0 and QH 1 are reserved and must not be used anywhere. > @@ -991,7 +991,7 @@ grub_ehci_find_qh (struct grub_ehci *e, grub_usb_tr= ansfer_t transfer) > target =3D ((transfer->endpoint << GRUB_EHCI_EP_NUM_OFF) | > transfer->devaddr) & GRUB_EHCI_TARGET_MASK; > target =3D grub_cpu_to_le32 (target); > - mask =3D grub_cpu_to_le32 (GRUB_EHCI_TARGET_MASK); > + mask =3D grub_cpu_to_le32_compile_time (GRUB_EHCI_TARGET_MASK); > =20 > /* low speed interrupt transfers are linked to the periodic */ > /* schedule, everything else to the asynchronous schedule */ > @@ -1200,7 +1200,7 @@ grub_ehci_transaction (struct grub_ehci *e, > grub_memset ((void *) td, 0, sizeof (struct grub_ehci_td)); > =20 > /* Don't point to any TD yet, just terminate. */ > - td->next_td =3D grub_cpu_to_le32 (GRUB_EHCI_TERMINATE); > + td->next_td =3D grub_cpu_to_le32_compile_time (GRUB_EHCI_TERMINATE);= > /* Set alternate pointer. When short packet occurs, alternate TD > * will not be really fetched because it is not active. But don't > * forget, EHCI will try to fetch alternate TD every scan of AL > @@ -1325,9 +1325,9 @@ grub_ehci_setup_transfer (grub_usb_controller_t d= ev, > /* Fill whole alternate TD by zeros (=3D inactive) and set > * Terminate bits and Halt bit */ > grub_memset ((void *) cdata->td_alt_virt, 0, sizeof (struct grub_ehc= i_td)); > - cdata->td_alt_virt->next_td =3D grub_cpu_to_le32 (GRUB_EHCI_TERMINAT= E); > - cdata->td_alt_virt->alt_next_td =3D grub_cpu_to_le32 (GRUB_EHCI_TERM= INATE); > - cdata->td_alt_virt->token =3D grub_cpu_to_le32 (GRUB_EHCI_STATUS_HAL= TED); > + cdata->td_alt_virt->next_td =3D grub_cpu_to_le32_compile_time (GRUB_= EHCI_TERMINATE); > + cdata->td_alt_virt->alt_next_td =3D grub_cpu_to_le32_compile_time (G= RUB_EHCI_TERMINATE); > + cdata->td_alt_virt->token =3D grub_cpu_to_le32_compile_time (GRUB_EH= CI_STATUS_HALTED); > =20 > /* Allocate appropriate number of TDs and set */ > for (i =3D 0; i < transfer->transcnt; i++) > @@ -1364,7 +1364,7 @@ grub_ehci_setup_transfer (grub_usb_controller_t d= ev, > cdata->td_last_virt =3D td; > cdata->td_last_phys =3D grub_dma_virt2phys (td, e->td_chunk); > /* Last TD should not have set alternate TD */ > - cdata->td_last_virt->alt_next_td =3D grub_cpu_to_le32 (GRUB_EHCI_TER= MINATE); > + cdata->td_last_virt->alt_next_td =3D grub_cpu_to_le32_compile_time (= GRUB_EHCI_TERMINATE); > =20 > grub_dprintf ("ehci", "setup_transfer: cdata=3D%p, qh=3D%p\n", > cdata,cdata->qh_virt); > @@ -1377,14 +1377,14 @@ grub_ehci_setup_transfer (grub_usb_controller_t= dev, > /* Start transfer: */ > /* Unlink possible alternate pointer in QH */ > cdata->qh_virt->td_overlay.alt_next_td =3D > - grub_cpu_to_le32 (GRUB_EHCI_TERMINATE); > + grub_cpu_to_le32_compile_time (GRUB_EHCI_TERMINATE); > /* Link new TDs with QH via next_td */ > cdata->qh_virt->td_overlay.next_td =3D > grub_cpu_to_le32 (grub_dma_virt2phys > (cdata->td_first_virt, e->td_chunk)); > /* Reset Active and Halted bits in QH to activate Advance Queue, > * i.e. reset token */ > - cdata->qh_virt->td_overlay.token =3D grub_cpu_to_le32 (0); > + cdata->qh_virt->td_overlay.token =3D grub_cpu_to_le32_compile_time (= 0); > =20 > /* Finito */ > transfer->controller_data =3D cdata; > @@ -1408,9 +1408,9 @@ grub_ehci_pre_finish_transfer (grub_usb_transfer_= t transfer) > * safely manipulate with QH TD part. */ > cdata->qh_virt->td_overlay.token =3D (cdata->qh_virt->td_overlay.tok= en > | > - grub_cpu_to_le32 > + grub_cpu_to_le32_compile_time > (GRUB_EHCI_STATUS_HALTED)) & > - grub_cpu_to_le32 (~GRUB_EHCI_STATUS_ACTIVE); > + grub_cpu_to_le32_compile_time (~GRUB_EHCI_STATUS_ACTIVE); > =20 > /* Print debug data here if necessary */ > =20 > diff --git a/grub-core/bus/usb/ohci.c b/grub-core/bus/usb/ohci.c > index 946a4ed..d27bfe7 100644 > --- a/grub-core/bus/usb/ohci.c > +++ b/grub-core/bus/usb/ohci.c > @@ -314,7 +314,7 @@ grub_ohci_pci_iter (grub_pci_device_t dev, grub_pci= _id_t pciid, > grub_memset ((void *) o->ed_ctrl, 0, sizeof (struct grub_ohci_ed) > * GRUB_OHCI_CTRL_EDS); > for (j=3D0; j < GRUB_OHCI_CTRL_EDS; j++) > - o->ed_ctrl[j].target =3D grub_cpu_to_le32 (1 << 14); /* skip */ > + o->ed_ctrl[j].target =3D grub_cpu_to_le32_compile_time (1 << 14); = /* skip */ > =20 > grub_dprintf ("ohci", "EDs-C: chunk=3D%p, virt=3D%p, phys=3D0x%02x\n= ", > o->ed_ctrl_chunk, o->ed_ctrl, o->ed_ctrl_addr); > @@ -329,7 +329,7 @@ grub_ohci_pci_iter (grub_pci_device_t dev, grub_pci= _id_t pciid, > /* Preset EDs */ > grub_memset ((void*)o->ed_bulk, 0, sizeof(struct grub_ohci_ed) * GRU= B_OHCI_BULK_EDS); > for (j=3D0; j < GRUB_OHCI_BULK_EDS; j++) > - o->ed_bulk[j].target =3D grub_cpu_to_le32 (1 << 14); /* skip */ > + o->ed_bulk[j].target =3D grub_cpu_to_le32_compile_time (1 << 14); = /* skip */ > =20 > grub_dprintf ("ohci", "EDs-B: chunk=3D%p, virt=3D%p, phys=3D0x%02x\n= ", > o->ed_bulk_chunk, o->ed_bulk, o->ed_bulk_addr); > @@ -1349,10 +1349,10 @@ grub_ohci_fini_hw (int noreturn __attribute__ (= (unused))) > /* Set skip in all EDs */ > if (o->ed_bulk) > for (i=3D0; i < GRUB_OHCI_BULK_EDS; i++) > - o->ed_bulk[i].target |=3D grub_cpu_to_le32 (1 << 14); /* ski= p */ > + o->ed_bulk[i].target |=3D grub_cpu_to_le32_compile_time (1 <= < 14); /* skip */ > if (o->ed_ctrl) > for (i=3D0; i < GRUB_OHCI_CTRL_EDS; i++) > - o->ed_ctrl[i].target |=3D grub_cpu_to_le32 (1 << 14); /* ski= p */ > + o->ed_ctrl[i].target |=3D grub_cpu_to_le32_compile_time (1 <= < 14); /* skip */ > =20 > /* We should wait for next SOF to be sure that all EDs are > * unaccessed by OHCI. But OHCI can be non-functional, so > diff --git a/grub-core/commands/gptsync.c b/grub-core/commands/gptsync.= c > index 3db6288..16592e9 100644 > --- a/grub-core/commands/gptsync.c > +++ b/grub-core/commands/gptsync.c > @@ -101,7 +101,7 @@ grub_cmd_gptsync (grub_command_t cmd __attribute__ = ((unused)), > } > =20 > /* Check if it is valid. */ > - if (mbr.signature !=3D grub_cpu_to_le16 (GRUB_PC_PARTITION_SIGNATURE= )) > + if (mbr.signature !=3D grub_cpu_to_le16_compile_time (GRUB_PC_PARTIT= ION_SIGNATURE)) > { > grub_device_close (dev); > return grub_error (GRUB_ERR_BAD_PART_TABLE, "no signature"); > @@ -216,7 +216,7 @@ grub_cmd_gptsync (grub_command_t cmd __attribute__ = ((unused)), > first_sector--; > mbr.entries[0].flag =3D 0; > mbr.entries[0].type =3D GRUB_PC_PARTITION_TYPE_GPT_DISK; > - mbr.entries[0].start =3D grub_cpu_to_le32 (1); > + mbr.entries[0].start =3D grub_cpu_to_le32_compile_time (1); > lba_to_chs (1, > &(mbr.entries[0].start_sector), > &(mbr.entries[0].start_cylinder), > @@ -227,7 +227,7 @@ grub_cmd_gptsync (grub_command_t cmd __attribute__ = ((unused)), > &(mbr.entries[0].end_head)); > mbr.entries[0].length =3D grub_cpu_to_le32 (first_sector); > =20 > - mbr.signature =3D grub_cpu_to_le16 (GRUB_PC_PARTITION_SIGNATURE); > + mbr.signature =3D grub_cpu_to_le16_compile_time (GRUB_PC_PARTITION_S= IGNATURE); > =20 > if (grub_disk_write (dev->disk, 0, 0, sizeof (mbr), &mbr)) > { > diff --git a/grub-core/disk/scsi.c b/grub-core/disk/scsi.c > index b6cb2f4..92084d0 100644 > --- a/grub-core/disk/scsi.c > +++ b/grub-core/disk/scsi.c > @@ -201,7 +201,7 @@ grub_scsi_read_capacity16 (grub_scsi_t scsi) > rc.opcode =3D grub_scsi_cmd_read_capacity16; > rc.lun =3D (scsi->lun << GRUB_SCSI_LUN_SHIFT) | 0x10; > rc.logical_block_addr =3D 0; > - rc.alloc_len =3D grub_cpu_to_be32 (sizeof (rcd)); > + rc.alloc_len =3D grub_cpu_to_be32_compile_time (sizeof (rcd)); > rc.PMI =3D 0; > rc.control =3D 0; > =09 > diff --git a/grub-core/disk/usbms.c b/grub-core/disk/usbms.c > index 2b769bd..380ca4c 100644 > --- a/grub-core/disk/usbms.c > +++ b/grub-core/disk/usbms.c > @@ -307,7 +307,7 @@ grub_usbms_transfer_bo (struct grub_scsi *scsi, gru= b_size_t cmdsize, char *cmd, > =20 > /* Setup the request. */ > grub_memset (&cbw, 0, sizeof (cbw)); > - cbw.signature =3D grub_cpu_to_le32 (0x43425355); > + cbw.signature =3D grub_cpu_to_le32_compile_time (0x43425355); > cbw.tag =3D tag; > cbw.transfer_length =3D grub_cpu_to_le32 (size); > cbw.flags =3D (!read_write) << GRUB_USBMS_DIRECTION_BIT; > @@ -414,7 +414,7 @@ CheckCSW: > =20 > /* If phase error or not valid signature, do bulk-only reset device.= */ > if ((status.status =3D=3D 2) || > - (status.signature !=3D grub_cpu_to_le32(0x53425355))) > + (status.signature !=3D grub_cpu_to_le32_compile_time(0x53425355)= )) > { /* Bulk-only reset device. */ > grub_dprintf ("usb", "Bulk-only reset device - bad status\n"); > grub_usbms_reset (dev); > diff --git a/grub-core/fs/hfs.c b/grub-core/fs/hfs.c > index 1e59305..d1dc015 100644 > --- a/grub-core/fs/hfs.c > +++ b/grub-core/fs/hfs.c > @@ -369,7 +369,7 @@ grub_hfs_mount (grub_disk_t disk) > =20 > /* Lookup the root directory node in the catalog tree using the > volume name. */ > - key.parent_dir =3D grub_cpu_to_be32 (1); > + key.parent_dir =3D grub_cpu_to_be32_compile_time (1); > key.strlen =3D data->sblock.volname[0]; > grub_strcpy ((char *) key.str, (char *) (data->sblock.volname + 1));= > =20 > diff --git a/grub-core/fs/reiserfs.c b/grub-core/fs/reiserfs.c > index ac65054..de3d4fa 100644 > --- a/grub-core/fs/reiserfs.c > +++ b/grub-core/fs/reiserfs.c > @@ -365,7 +365,7 @@ grub_reiserfs_set_key_offset (struct grub_reiserfs_= key *key, > key->u.v1.offset =3D grub_cpu_to_le32 (value); > else > key->u.v2.offset_type \ > - =3D ((key->u.v2.offset_type & grub_cpu_to_le64 (15ULL << 60)) > + =3D ((key->u.v2.offset_type & grub_cpu_to_le64_compile_time (15U= LL << 60)) > | grub_cpu_to_le64 (value & (~0ULL >> 4))); > } > =20 > @@ -412,7 +412,7 @@ grub_reiserfs_set_key_type (struct grub_reiserfs_ke= y *key, > key->u.v1.type =3D grub_cpu_to_le32 (type); > else > key->u.v2.offset_type > - =3D ((key->u.v2.offset_type & grub_cpu_to_le64 (~0ULL >> 4)) > + =3D ((key->u.v2.offset_type & grub_cpu_to_le64_compile_time (~0U= LL >> 4)) > | grub_cpu_to_le64 ((grub_uint64_t) type << 60)); > =20 > assert (grub_reiserfs_get_key_type (key) =3D=3D grub_type); > @@ -997,8 +997,8 @@ grub_reiserfs_open (struct grub_file *file, const c= har *name) > data =3D grub_reiserfs_mount (file->device->disk); > if (! data) > goto fail; > - key.directory_id =3D grub_cpu_to_le32 (1); > - key.object_id =3D grub_cpu_to_le32 (2); > + key.directory_id =3D grub_cpu_to_le32_compile_time (1); > + key.object_id =3D grub_cpu_to_le32_compile_time (2); > key.u.v2.offset_type =3D 0; > grub_reiserfs_set_key_type (&key, GRUB_REISERFS_DIRECTORY, 2); > grub_reiserfs_set_key_offset (&key, 1); > @@ -1289,8 +1289,8 @@ grub_reiserfs_dir (grub_device_t device, const ch= ar *path, > data =3D grub_reiserfs_mount (device->disk); > if (! data) > goto fail; > - root_key.directory_id =3D grub_cpu_to_le32 (1); > - root_key.object_id =3D grub_cpu_to_le32 (2); > + root_key.directory_id =3D grub_cpu_to_le32_compile_time (1); > + root_key.object_id =3D grub_cpu_to_le32_compile_time (2); > root_key.u.v2.offset_type =3D 0; > grub_reiserfs_set_key_type (&root_key, GRUB_REISERFS_DIRECTORY, 2); > grub_reiserfs_set_key_offset (&root_key, 1); > diff --git a/grub-core/lib/fdt.c b/grub-core/lib/fdt.c > index 907a7bf..e7fdd14 100644 > --- a/grub-core/lib/fdt.c > +++ b/grub-core/lib/fdt.c > @@ -164,10 +164,10 @@ static int add_subnode (void *fdt, int parentoffs= et, const char *name) > insert: > grub_memmove (token + entry_size / sizeof(*token), token, > (grub_addr_t) end - (grub_addr_t) token); > - *token =3D grub_cpu_to_be32(FDT_BEGIN_NODE); > + *token =3D grub_cpu_to_be32_compile_time(FDT_BEGIN_NODE); > token[entry_size / sizeof(*token) - 2] =3D 0; /* padding bytes */ > grub_strcpy((char *) (token + 1), name); > - token[entry_size / sizeof(*token) - 1] =3D grub_cpu_to_be32(FDT_END_= NODE); > + token[entry_size / sizeof(*token) - 1] =3D grub_cpu_to_be32_compile_= time(FDT_END_NODE); > grub_fdt_set_size_dt_struct (fdt, struct_size + entry_size); > return ((grub_addr_t) token - (grub_addr_t) fdt > - grub_fdt_get_off_dt_struct(fdt)); > @@ -377,7 +377,7 @@ int grub_fdt_set_prop (void *fdt, unsigned int node= offset, const char *name, > =20 > prop_name_present =3D 1; > for (i =3D 0; i < prop_len / sizeof(grub_uint32_t); i++) > - *(prop + 3 + i) =3D grub_cpu_to_be32 (FDT_NOP); > + *(prop + 3 + i) =3D grub_cpu_to_be32_compile_time (FDT_NOP); > if (len > ALIGN_UP(prop_len, sizeof(grub_uint32_t))) > { > /* Length of new property value is greater than the space al= located > @@ -385,7 +385,7 @@ int grub_fdt_set_prop (void *fdt, unsigned int node= offset, const char *name, > nameoff field of the current entry and replace the curren= t entry > with NOP tokens. */ > nameoff =3D grub_be_to_cpu32 (*(prop + 2)); > - *prop =3D *(prop + 1) =3D *(prop + 2) =3D grub_cpu_to_be32 (FDT= _NOP); > + *prop =3D *(prop + 1) =3D *(prop + 2) =3D grub_cpu_to_be32_comp= ile_time (FDT_NOP); > prop =3D NULL; > } > } > @@ -419,7 +419,7 @@ int grub_fdt_set_prop (void *fdt, unsigned int node= offset, const char *name, > struct_end(fdt) - (grub_addr_t) prop); > grub_fdt_set_size_dt_struct (fdt, grub_fdt_get_size_dt_struct (fdt= ) > + prop_entry_size(len)); > - *prop =3D grub_cpu_to_be32 (FDT_PROP); > + *prop =3D grub_cpu_to_be32_compile_time (FDT_PROP); > *(prop + 2) =3D grub_cpu_to_be32 (nameoff); > } > *(prop + 1) =3D grub_cpu_to_be32 (len); > @@ -447,7 +447,7 @@ grub_fdt_create_empty_tree (void *fdt, unsigned int= size) > et->empty_node.node_end =3D grub_cpu_to_be32_compile_time (FDT_END_N= ODE); > et->empty_node.node_start =3D grub_cpu_to_be32_compile_time (FDT_BEG= IN_NODE); > ((struct grub_fdt_empty_tree *) fdt)->header.off_mem_rsvmap =3D > - grub_cpu_to_be32 (ALIGN_UP (sizeof (grub_fdt_header_t), 8)); > + grub_cpu_to_be32_compile_time (ALIGN_UP (sizeof (grub_fdt_header_t= ), 8)); > =20 > grub_fdt_set_off_dt_strings (fdt, sizeof (*et)); > grub_fdt_set_off_dt_struct (fdt, > diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linu= x.c > index 31fb91e..44ee89d 100644 > --- a/grub-core/loader/i386/linux.c > +++ b/grub-core/loader/i386/linux.c > @@ -722,7 +722,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((= unused)), > =20 > /* FIXME: 2.03 is not always good enough (Linux 2.4 can be 2.03 and > still not support 32-bit boot. */ > - if (lh.header !=3D grub_cpu_to_le32 (GRUB_LINUX_MAGIC_SIGNATURE) > + if (lh.header !=3D grub_cpu_to_le32_compile_time (GRUB_LINUX_MAGIC_S= IGNATURE) > || grub_le_to_cpu16 (lh.version) < 0x0203) > { > grub_error (GRUB_ERR_BAD_OS, "version too old for 32-bit boot" > diff --git a/grub-core/loader/i386/pc/linux.c b/grub-core/loader/i386/p= c/linux.c > index 672c013..230c9ac 100644 > --- a/grub-core/loader/i386/pc/linux.c > +++ b/grub-core/loader/i386/pc/linux.c > @@ -151,7 +151,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((= unused)), > goto fail; > } > =20 > - if (lh.boot_flag !=3D grub_cpu_to_le16 (0xaa55)) > + if (lh.boot_flag !=3D grub_cpu_to_le16_compile_time (0xaa55)) > { > grub_error (GRUB_ERR_BAD_OS, "invalid magic number"); > goto fail; > @@ -169,7 +169,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((= unused)), > =20 > maximal_cmdline_size =3D 256; > =20 > - if (lh.header =3D=3D grub_cpu_to_le32 (GRUB_LINUX_MAGIC_SIGNATURE) > + if (lh.header =3D=3D grub_cpu_to_le32_compile_time (GRUB_LINUX_MAGIC= _SIGNATURE) > && grub_le_to_cpu16 (lh.version) >=3D 0x0200) > { > grub_linux_is_bzimage =3D (lh.loadflags & GRUB_LINUX_FLAG_BIG_KE= RNEL); > @@ -188,7 +188,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((= unused)), > =20 > if (grub_le_to_cpu16 (lh.version) >=3D 0x0201) > { > - lh.heap_end_ptr =3D grub_cpu_to_le16 (GRUB_LINUX_HEAP_END_OFFSET); > + lh.heap_end_ptr =3D grub_cpu_to_le16_compile_time (GRUB_LINUX_HEAP_= END_OFFSET); > lh.loadflags |=3D GRUB_LINUX_FLAG_CAN_USE_HEAP; > } > =20 > @@ -196,17 +196,17 @@ grub_cmd_linux (grub_command_t cmd __attribute__ = ((unused)), > lh.cmd_line_ptr =3D grub_linux_real_target + GRUB_LINUX_CL_OFFSET; > else > { > - lh.cl_magic =3D grub_cpu_to_le16 (GRUB_LINUX_CL_MAGIC); > - lh.cl_offset =3D grub_cpu_to_le16 (GRUB_LINUX_CL_OFFSET); > - lh.setup_move_size =3D grub_cpu_to_le16 (GRUB_LINUX_CL_OFFSET > + lh.cl_magic =3D grub_cpu_to_le16_compile_time (GRUB_LINUX_CL_MAGIC)= ; > + lh.cl_offset =3D grub_cpu_to_le16_compile_time (GRUB_LINUX_CL_OFFSE= T); > + lh.setup_move_size =3D grub_cpu_to_le16_compile_time (GRUB_LINUX_CL= _OFFSET > + maximal_cmdline_size); > } > } > else > { > /* Your kernel is quite old... */ > - lh.cl_magic =3D grub_cpu_to_le16 (GRUB_LINUX_CL_MAGIC); > - lh.cl_offset =3D grub_cpu_to_le16 (GRUB_LINUX_CL_OFFSET); > + lh.cl_magic =3D grub_cpu_to_le16_compile_time (GRUB_LINUX_CL_MAG= IC); > + lh.cl_offset =3D grub_cpu_to_le16_compile_time (GRUB_LINUX_CL_OF= FSET); > =20 > setup_sects =3D GRUB_LINUX_DEFAULT_SETUP_SECTS; > =20 > @@ -319,7 +319,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((= unused)), > goto fail; > } > =20 > - if (lh.header !=3D grub_cpu_to_le32 (GRUB_LINUX_MAGIC_SIGNATURE) > + if (lh.header !=3D grub_cpu_to_le32_compile_time (GRUB_LINUX_MAGIC_S= IGNATURE) > || grub_le_to_cpu16 (lh.version) < 0x0200) > /* Clear the heap space. */ > grub_memset (grub_linux_real_chunk > @@ -404,7 +404,7 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ (= (unused)), > =20 > lh =3D (struct linux_kernel_header *) grub_linux_real_chunk; > =20 > - if (!(lh->header =3D=3D grub_cpu_to_le32 (GRUB_LINUX_MAGIC_SIGNATURE= ) > + if (!(lh->header =3D=3D grub_cpu_to_le32_compile_time (GRUB_LINUX_MA= GIC_SIGNATURE) > && grub_le_to_cpu16 (lh->version) >=3D 0x0200)) > { > grub_error (GRUB_ERR_BAD_OS, "the kernel is too old for initrd")= ; > diff --git a/grub-core/loader/i386/xen_file.c b/grub-core/loader/i386/x= en_file.c > index ff23235..5836218 100644 > --- a/grub-core/loader/i386/xen_file.c > +++ b/grub-core/loader/i386/xen_file.c > @@ -38,8 +38,8 @@ grub_xen_file (grub_file_t file) > if (grub_file_read (file, &lh, sizeof (lh)) !=3D sizeof (lh)) > goto fail; > =20 > - if (lh.boot_flag !=3D grub_cpu_to_le16 (0xaa55) > - || lh.header !=3D grub_cpu_to_le32 (GRUB_LINUX_MAGIC_SIGNATURE) > + if (lh.boot_flag !=3D grub_cpu_to_le16_compile_time (0xaa55) > + || lh.header !=3D grub_cpu_to_le32_compile_time (GRUB_LINUX_MAGI= C_SIGNATURE) > || grub_le_to_cpu16 (lh.version) < 0x0208) > { > grub_error (GRUB_ERR_BAD_OS, "version too old for xen boot"); > diff --git a/grub-core/net/arp.c b/grub-core/net/arp.c > index d62d0cc..8cc390b 100644 > --- a/grub-core/net/arp.c > +++ b/grub-core/net/arp.c > @@ -81,11 +81,11 @@ grub_net_arp_send_request (struct grub_net_network_= level_interface *inf, > return err; > =20 > arp_header =3D (struct arphdr *) nb.data; > - arp_header->hrd =3D grub_cpu_to_be16 (GRUB_NET_ARPHRD_ETHERNET); > + arp_header->hrd =3D grub_cpu_to_be16_compile_time (GRUB_NET_ARPHRD_E= THERNET); > arp_header->hln =3D 6; > arp_header->pro =3D grub_cpu_to_be16 (etherpro); > arp_header->pln =3D addrlen; > - arp_header->op =3D grub_cpu_to_be16 (ARP_REQUEST); > + arp_header->op =3D grub_cpu_to_be16_compile_time (ARP_REQUEST); > aux =3D (grub_uint8_t *) arp_header + sizeof (*arp_header); > /* Sender hardware address. */ > grub_memcpy (aux, &inf->hwaddress.mac, 6); > diff --git a/grub-core/net/bootp.c b/grub-core/net/bootp.c > index 6310ed4..6136755 100644 > --- a/grub-core/net/bootp.c > +++ b/grub-core/net/bootp.c > @@ -522,8 +522,8 @@ grub_cmd_bootp (struct grub_command *cmd __attribut= e__ ((unused)), > grub_netbuff_push (nb, sizeof (*udph)); > =20 > udph =3D (struct udphdr *) nb->data; > - udph->src =3D grub_cpu_to_be16 (68); > - udph->dst =3D grub_cpu_to_be16 (67); > + udph->src =3D grub_cpu_to_be16_compile_time (68); > + udph->dst =3D grub_cpu_to_be16_compile_time (67); > udph->chksum =3D 0; > udph->len =3D grub_cpu_to_be16 (nb->tail - nb->data); > target.type =3D GRUB_NET_NETWORK_LEVEL_PROTOCOL_IPV4; > diff --git a/grub-core/net/ip.c b/grub-core/net/ip.c > index c6971f9..5a60954 100644 > --- a/grub-core/net/ip.c > +++ b/grub-core/net/ip.c > @@ -611,7 +611,7 @@ grub_net_send_ip6_packet (struct grub_net_network_l= evel_interface *inf, > grub_netbuff_push (nb, sizeof (*iph)); > iph =3D (struct ip6hdr *) nb->data; > =20 > - iph->version_class_flow =3D grub_cpu_to_be32 ((6 << 28)); > + iph->version_class_flow =3D grub_cpu_to_be32_compile_time ((6 << 28)= ); > iph->len =3D grub_cpu_to_be16 (nb->tail - nb->data - sizeof (*iph));= > iph->protocol =3D proto; > iph->ttl =3D 0xff; > diff --git a/grub-core/net/net.c b/grub-core/net/net.c > index f2e723b..82af3a0 100644 > --- a/grub-core/net/net.c > +++ b/grub-core/net/net.c > @@ -306,7 +306,7 @@ grub_net_ipv6_get_link_local (struct grub_net_card = *card, > return NULL; > =20 > addr.type =3D GRUB_NET_NETWORK_LEVEL_PROTOCOL_IPV6; > - addr.ipv6[0] =3D grub_cpu_to_be64 (0xfe80ULL << 48); > + addr.ipv6[0] =3D grub_cpu_to_be64_compile_time (0xfe80ULL << 48); > addr.ipv6[1] =3D grub_net_ipv6_get_id (hwaddr); > =20 > FOR_NET_NETWORK_LEVEL_INTERFACES (inf) > diff --git a/grub-core/net/tftp.c b/grub-core/net/tftp.c > index 5173614..1319671 100644 > --- a/grub-core/net/tftp.c > +++ b/grub-core/net/tftp.c > @@ -149,7 +149,7 @@ ack (tftp_data_t data, grub_uint64_t block) > return err; > =20 > tftph_ack =3D (struct tftphdr *) nb_ack.data; > - tftph_ack->opcode =3D grub_cpu_to_be16 (TFTP_ACK); > + tftph_ack->opcode =3D grub_cpu_to_be16_compile_time (TFTP_ACK); > tftph_ack->u.ack.block =3D grub_cpu_to_be16 (block); > =20 > err =3D grub_net_send_udp_packet (data->sock, &nb_ack); > @@ -333,7 +333,7 @@ tftp_open (struct grub_file *file, const char *file= name) > rrq =3D (char *) tftph->u.rrq; > rrqlen =3D 0; > =20 > - tftph->opcode =3D grub_cpu_to_be16 (TFTP_RRQ); > + tftph->opcode =3D grub_cpu_to_be16_compile_time (TFTP_RRQ); > grub_strcpy (rrq, filename); > rrqlen +=3D grub_strlen (filename) + 1; > rrq +=3D grub_strlen (filename) + 1; > @@ -443,8 +443,8 @@ tftp_close (struct grub_file *file) > if (!err) > { > tftph =3D (struct tftphdr *) nb_err.data; > - tftph->opcode =3D grub_cpu_to_be16 (TFTP_ERROR); > - tftph->u.err.errcode =3D grub_cpu_to_be16 (TFTP_EUNDEF); > + tftph->opcode =3D grub_cpu_to_be16_compile_time (TFTP_ERROR); > + tftph->u.err.errcode =3D grub_cpu_to_be16_compile_time (TFTP_EUNDEF= ); > grub_memcpy (tftph->u.err.errmsg, "closed", sizeof ("closed")); > =20 > err =3D grub_net_send_udp_packet (data->sock, &nb_err); > diff --git a/grub-core/partmap/acorn.c b/grub-core/partmap/acorn.c > index 7bb93d9..c022c61 100644 > --- a/grub-core/partmap/acorn.c > +++ b/grub-core/partmap/acorn.c > @@ -25,8 +25,8 @@ > =20 > GRUB_MOD_LICENSE ("GPLv3+"); > =20 > -#define LINUX_NATIVE_MAGIC grub_cpu_to_le32 (0xdeafa1de) > -#define LINUX_SWAP_MAGIC grub_cpu_to_le32 (0xdeafab1e) > +#define LINUX_NATIVE_MAGIC grub_cpu_to_le32_compile_time (0xdeafa1de) > +#define LINUX_SWAP_MAGIC grub_cpu_to_le32_compile_time (0xdeafab1e) > #define LINUX_MAP_ENTRIES (512 / 12) > =20 > #define NONADFS_PARTITION_TYPE_LINUX 9 > diff --git a/grub-core/partmap/bsdlabel.c b/grub-core/partmap/bsdlabel.= c > index cf0f967..1d78590 100644 > --- a/grub-core/partmap/bsdlabel.c > +++ b/grub-core/partmap/bsdlabel.c > @@ -53,7 +53,7 @@ iterate_real (grub_disk_t disk, grub_disk_addr_t sect= or, int freebsd, > return grub_errno; > =20 > /* Check if it is valid. */ > - if (label.magic !=3D grub_cpu_to_le32 (GRUB_PC_PARTITION_BSD_LABEL_M= AGIC)) > + if (label.magic !=3D grub_cpu_to_le32_compile_time (GRUB_PC_PARTITIO= N_BSD_LABEL_MAGIC)) > return grub_error (GRUB_ERR_BAD_PART_TABLE, "no signature"); > =20 > /* A kludge to determine a base of be.offset. */ > diff --git a/grub-core/partmap/gpt.c b/grub-core/partmap/gpt.c > index 38df7b3..83bcba7 100644 > --- a/grub-core/partmap/gpt.c > +++ b/grub-core/partmap/gpt.c > @@ -65,7 +65,7 @@ grub_gpt_partition_map_iterate (grub_disk_t disk, > return grub_errno; > =20 > /* Check if it is valid. */ > - if (mbr.signature !=3D grub_cpu_to_le16 (GRUB_PC_PARTITION_SIGNATURE= )) > + if (mbr.signature !=3D grub_cpu_to_le16_compile_time (GRUB_PC_PARTIT= ION_SIGNATURE)) > return grub_error (GRUB_ERR_BAD_PART_TABLE, "no signature"); > =20 > /* Make sure the MBR is a protective MBR and not a normal MBR. */ > diff --git a/grub-core/partmap/msdos.c b/grub-core/partmap/msdos.c > index 1d81a53..46c406b 100644 > --- a/grub-core/partmap/msdos.c > +++ b/grub-core/partmap/msdos.c > @@ -162,7 +162,7 @@ grub_partition_msdos_iterate (grub_disk_t disk, > lastaddr =3D p.offset; > =20 > /* Check if it is valid. */ > - if (mbr.signature !=3D grub_cpu_to_le16 (GRUB_PC_PARTITION_SIGNA= TURE)) > + if (mbr.signature !=3D grub_cpu_to_le16_compile_time (GRUB_PC_PA= RTITION_SIGNATURE)) > return grub_error (GRUB_ERR_BAD_PART_TABLE, "no signature"); > =20 > for (i =3D 0; i < 4; i++) > @@ -280,7 +280,7 @@ pc_partition_map_embed (struct grub_disk *disk, uns= igned int *nsectors, > lastaddr =3D offset; > =20 > /* Check if it is valid. */ > - if (mbr.signature !=3D grub_cpu_to_le16 (GRUB_PC_PARTITION_SIGNA= TURE)) > + if (mbr.signature !=3D grub_cpu_to_le16_compile_time (GRUB_PC_PA= RTITION_SIGNATURE)) > return grub_error (GRUB_ERR_BAD_PART_TABLE, "no signature"); > =20 > for (i =3D 0; i < 4; i++) > diff --git a/grub-core/tests/video_checksum.c b/grub-core/tests/video_c= hecksum.c > index 491bc55..74d5b65 100644 > --- a/grub-core/tests/video_checksum.c > +++ b/grub-core/tests/video_checksum.c > @@ -288,16 +288,16 @@ grub_video_capture_write_bmp (const char *fname, > if (mode_info->mode_type & GRUB_VIDEO_MODE_TYPE_RGB) > { > head.filesize =3D grub_cpu_to_le32 (sizeof (head) + mode_info->w= idth * mode_info->height * 3); > - head.bmp_off =3D grub_cpu_to_le32 (sizeof (head)); > + head.bmp_off =3D grub_cpu_to_le32_compile_time (sizeof (head)); > head.bpp =3D grub_cpu_to_le16_compile_time (24); > } > else > { > head.filesize =3D grub_cpu_to_le32 (sizeof (head) + 3 * 256 + mo= de_info->width * mode_info->height); > - head.bmp_off =3D grub_cpu_to_le32 (sizeof (head) + 3 * 256); > + head.bmp_off =3D grub_cpu_to_le32_compile_time (sizeof (head) + = 3 * 256); > head.bpp =3D grub_cpu_to_le16_compile_time (8); > } > - head.head_size =3D grub_cpu_to_le32 (sizeof (head) - 14); > + head.head_size =3D grub_cpu_to_le32_compile_time (sizeof (head) - 14= ); > head.width =3D grub_cpu_to_le16 (mode_info->width); > head.height =3D grub_cpu_to_le16 (mode_info->height); > head.planes =3D grub_cpu_to_le16_compile_time (1); > diff --git a/util/grub-mkfont.c b/util/grub-mkfont.c > index e6485b4..a0cab3a 100644 > --- a/util/grub-mkfont.c > +++ b/util/grub-mkfont.c > @@ -704,7 +704,7 @@ write_be16_section (const char *name, grub_uint16_t= data, int* offset, > { > grub_uint32_t leng; > =20 > - leng =3D grub_cpu_to_be32 (2); > + leng =3D grub_cpu_to_be32_compile_time (2); > data =3D grub_cpu_to_be16 (data); > grub_util_write_image (name, 4, file, filename); > grub_util_write_image ((char *) &leng, 4, file, filename); > @@ -801,7 +801,7 @@ write_font_pf2 (struct grub_font_info *font_info, c= har *output_file) > =20 > offset =3D 0; > =20 > - leng =3D grub_cpu_to_be32 (4); > + leng =3D grub_cpu_to_be32_compile_time (4); > grub_util_write_image (FONT_FORMAT_SECTION_NAMES_FILE, > sizeof(FONT_FORMAT_SECTION_NAMES_FILE) - 1, file, > output_file); > diff --git a/util/grub-mklayout.c b/util/grub-mklayout.c > index 692f881..1a4f1b4 100644 > --- a/util/grub-mklayout.c > +++ b/util/grub-mklayout.c > @@ -329,7 +329,7 @@ write_file (FILE *out, const char *fname, struct gr= ub_keyboard_layout *layout) > grub_uint32_t version; > unsigned i; > =20 > - version =3D grub_cpu_to_le32 (GRUB_KEYBOARD_LAYOUTS_VERSION); > + version =3D grub_cpu_to_le32_compile_time (GRUB_KEYBOARD_LAYOUTS_VER= SION); > =20 > for (i =3D 0; i < ARRAY_SIZE (layout->keyboard_map); i++) > layout->keyboard_map[i] =3D grub_cpu_to_le32(layout->keyboard_map[= i]); > diff --git a/util/mkimage.c b/util/mkimage.c > index 26d9816..f4f8c5f 100644 > --- a/util/mkimage.c > +++ b/util/mkimage.c > @@ -1539,7 +1539,7 @@ grub_install_generate_image (const char *dir, con= st char *prefix, > data_section->raw_data_size =3D grub_cpu_to_le32 (kernel_size - exec_= size); > data_section->raw_data_offset =3D grub_cpu_to_le32 (header_size + exe= c_size); > data_section->characteristics > - =3D grub_cpu_to_le32 (GRUB_PE32_SCN_CNT_INITIALIZED_DATA > + =3D grub_cpu_to_le32_compile_time (GRUB_PE32_SCN_CNT_INITIALIZED_DA= TA > | GRUB_PE32_SCN_MEM_READ > | GRUB_PE32_SCN_MEM_WRITE); > =20 > @@ -1551,7 +1551,7 @@ grub_install_generate_image (const char *dir, con= st char *prefix, > bss_section->raw_data_size =3D 0; > bss_section->raw_data_offset =3D 0; > bss_section->characteristics > - =3D grub_cpu_to_le32 (GRUB_PE32_SCN_MEM_READ > + =3D grub_cpu_to_le32_compile_time (GRUB_PE32_SCN_MEM_READ > | GRUB_PE32_SCN_MEM_WRITE > | GRUB_PE32_SCN_ALIGN_64BYTES > | GRUB_PE32_SCN_CNT_INITIALIZED_DATA > @@ -1565,7 +1565,7 @@ grub_install_generate_image (const char *dir, con= st char *prefix, > mods_section->raw_data_size =3D grub_cpu_to_le32 (reloc_addr - kernel= _size - header_size); > mods_section->raw_data_offset =3D grub_cpu_to_le32 (header_size + ker= nel_size); > mods_section->characteristics > - =3D grub_cpu_to_le32 (GRUB_PE32_SCN_CNT_INITIALIZED_DATA > + =3D grub_cpu_to_le32_compile_time (GRUB_PE32_SCN_CNT_INITIALIZED_DA= TA > | GRUB_PE32_SCN_MEM_READ > | GRUB_PE32_SCN_MEM_WRITE); > =20 > @@ -1576,7 +1576,7 @@ grub_install_generate_image (const char *dir, con= st char *prefix, > reloc_section->raw_data_size =3D grub_cpu_to_le32 (reloc_size); > reloc_section->raw_data_offset =3D grub_cpu_to_le32 (reloc_addr); > reloc_section->characteristics > - =3D grub_cpu_to_le32 (GRUB_PE32_SCN_CNT_INITIALIZED_DATA > + =3D grub_cpu_to_le32_compile_time (GRUB_PE32_SCN_CNT_INITIALIZED_DA= TA > | GRUB_PE32_SCN_MEM_DISCARDABLE > | GRUB_PE32_SCN_MEM_READ); > free (core_img); >=20 --aFBQlXMjcdg4baQcMtREAdWQrnJ9OUxlM Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iF4EAREKAAYFAlQe+GkACgkQmBXlbbo5nOtaoQD+PO3n9tubKN+wt8nRGzGi4PLf NUm/X9jyXv+WNGilj6QA/jt7LhZH66vKiGI6wE2cN/XTWASuoaW7Jxk1Qt9HmTjX =S4hC -----END PGP SIGNATURE----- --aFBQlXMjcdg4baQcMtREAdWQrnJ9OUxlM--