Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP4:Update
parted
libparted-gpt-fix-max-partnum-endianness.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File libparted-gpt-fix-max-partnum-endianness.patch of Package parted
From: "Richard W.M. Jones" <rjones@redhat.com> Date: Fri, 8 Jun 2012 13:19:25 +0100 Subject: gpt: fix endianness bug in gpt_get_max_supported_partition_count References: bsc#1104667 Patch-mainline: v3.2 Git-commit: 4ac1c02b590668c93afdb48900e0858de58cda3a * libparted/labels/gpt.c (gpt_get_max_supported_partition_count): Take endianness of pth->FirstUsableLBA into account (64-bit, little endian) when calculating the maximum number of partitions. Acked-by: Sebastian Parschauer <sparschauer@suse.de> --- libparted/labels/gpt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/libparted/labels/gpt.c +++ b/libparted/labels/gpt.c @@ -1880,12 +1880,12 @@ gpt_get_max_supported_partition_count (c if (!_header_is_valid (disk, pth, 1)) { - pth->FirstUsableLBA = 34; + pth->FirstUsableLBA = PED_CPU_TO_LE64 (34); pth->SizeOfPartitionEntry = PED_CPU_TO_LE32 (sizeof (GuidPartitionEntry_t)); } - *max_n = (disk->dev->sector_size * (pth->FirstUsableLBA - 2) + *max_n = (disk->dev->sector_size * (PED_LE64_TO_CPU (pth->FirstUsableLBA) - 2) / PED_LE32_TO_CPU (pth->SizeOfPartitionEntry)); pth_free (pth); return true;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor