From: "bibo,mao" <bibo.mao@intel.com>
To: grub-devel@gnu.org
Subject: grub2 64bit system compatible
Date: Thu, 07 Sep 2006 17:19:23 +0800 [thread overview]
Message-ID: <44FFE41B.60501@intel.com> (raw)
Hi,
The following is grub2 64-bit system compatible patch, in 64-bit
system unsigned long is defined as 64-bit, but not 32-bit. This
patch modify this point.
Thanks
bibo,mao
--- grub2/fs/fat.c 2006-06-04 23:56:54.000000000 +0800
+++ grub2.new/fs/fat.c 2006-09-07 16:49:50.000000000 +0800
@@ -243,7 +243,7 @@ grub_fat_mount (grub_disk_t disk)
else
{
/* FAT12 or FAT16. */
- data->root_cluster = ~0UL;
+ data->root_cluster = 0xFFFFFFFF;
if (data->num_clusters <= 4085 + 2)
{
@@ -297,7 +297,7 @@ grub_fat_mount (grub_disk_t disk)
/* Start from the root directory. */
data->file_cluster = data->root_cluster;
- data->cur_cluster_num = ~0UL;
+ data->cur_cluster_num = 0xFFFFFFFF;
data->attr = GRUB_FAT_ATTR_DIRECTORY;
return data;
@@ -322,7 +322,7 @@ grub_fat_read_data (grub_disk_t disk, st
/* This is a special case. FAT12 and FAT16 doesn't have the root directory
in clusters. */
- if (data->file_cluster == ~0UL)
+ if (data->file_cluster == 0xFFFFFFFF)
{
size = (data->num_root_sectors << GRUB_DISK_SECTOR_BITS) - offset;
if (size > len)
@@ -618,7 +618,7 @@ grub_fat_find_dir (grub_disk_t disk, str
data->file_size = grub_le_to_cpu32 (dir.file_size);
data->file_cluster = ((grub_le_to_cpu16 (dir.first_cluster_high) << 16)
| grub_le_to_cpu16 (dir.first_cluster_low));
- data->cur_cluster_num = ~0UL;
+ data->cur_cluster_num = 0xFFFFFFFF;
return dirp;
}
--- grub2/disk/loopback.c 2006-06-04 23:56:54.000000000 +0800
+++ grub2.new/disk/loopback.c 2006-09-07 16:32:06.000000000 +0800
@@ -179,7 +179,7 @@ grub_loopback_open (const char *name, gr
/* Use the filesize for the disk size, round up to a complete sector. */
disk->total_sectors = ((file->size + GRUB_DISK_SECTOR_SIZE - 1)
/ GRUB_DISK_SECTOR_SIZE);
- disk->id = (int) dev;
+ disk->id = (unsigned long) dev;
disk->has_partitions = dev->has_partitions;
disk->data = file;
--- grub2/include/grub/efi/api.h 2006-05-28 05:09:25.000000000 +0800
+++ grub2.new/include/grub/efi/api.h 2006-09-07 16:32:06.000000000 +0800
@@ -167,7 +168,7 @@ typedef grub_uint16_t grub_efi_char16_t;
typedef grub_efi_intn_t grub_efi_status_t;
#define GRUB_EFI_ERROR_CODE(value) \
- ((1 << (sizeof (grub_efi_status_t) * 8 - 1)) | (value))
+ ((0x1L << (sizeof (grub_efi_status_t) * 8 - 1)) | (value))
#define GRUB_EFI_WARNING_CODE(value) (value)
reply other threads:[~2006-09-07 9:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44FFE41B.60501@intel.com \
--to=bibo.mao@intel.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.