From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1GLG2m-0005LR-63 for mharc-grub-devel@gnu.org; Thu, 07 Sep 2006 05:19:32 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GLG2j-0005JX-Jb for grub-devel@gnu.org; Thu, 07 Sep 2006 05:19:29 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GLG2i-0005Il-Bp for grub-devel@gnu.org; Thu, 07 Sep 2006 05:19:28 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GLG2h-0005IM-UD for grub-devel@gnu.org; Thu, 07 Sep 2006 05:19:28 -0400 Received: from [192.55.52.88] (helo=mga01.intel.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GLG32-0001U5-QY for grub-devel@gnu.org; Thu, 07 Sep 2006 05:19:49 -0400 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by mga01.intel.com with ESMTP; 07 Sep 2006 02:19:25 -0700 Received: from unknown (HELO [10.239.24.57]) ([10.239.24.57]) by fmsmga001.fm.intel.com with ESMTP; 07 Sep 2006 02:19:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: i="4.08,223,1154934000"; d="scan'208"; a="126980057:sNHT17363787" Message-ID: <44FFE41B.60501@intel.com> Date: Thu, 07 Sep 2006 17:19:23 +0800 From: "bibo,mao" User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: grub-devel@gnu.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: grub2 64bit system compatible X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Sep 2006 09:19:30 -0000 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)