[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
grub2 64bit system compatible
From: |
bibo,mao |
Subject: |
grub2 64bit system compatible |
Date: |
Thu, 07 Sep 2006 17:19:23 +0800 |
User-agent: |
Thunderbird 1.5.0.5 (Windows/20060719) |
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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- grub2 64bit system compatible,
bibo,mao <=