[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gcc bug causes parted to write bad GPT entries
From: |
Andreas Dilger |
Subject: |
Re: gcc bug causes parted to write bad GPT entries |
Date: |
Tue, 19 Mar 2002 11:29:24 -0700 |
User-agent: |
Mutt/1.3.27i |
On Mar 19, 2002 15:36 -0600, address@hidden wrote:
> Legacy_mbr, in particular, does structure member dereferences that are most
> certainly not dword-aligned (there's a u16 'unknown' field in there prior to
> the start of the partition table proper).
This will break on non-x86 architectures (they will get a SIGBUS or so).
You need to access unaligned fields as bytes and store them in a local
variable, or memcpy the whole thing into an aligned version of the struct.
Cheers, Andreas
--
Andreas Dilger \ "If a man ate a pound of pasta and a pound of antipasto,
\ would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/ -- Dogbert
- Re: gcc bug causes parted to write bad GPT entries, (continued)
- RE: gcc bug causes parted to write bad GPT entries, Matt_Domsch, 2002/03/15
- RE: gcc bug causes parted to write bad GPT entries, Matt_Domsch, 2002/03/18
- RE: gcc bug causes parted to write bad GPT entries, Matt_Domsch, 2002/03/18
- RE: gcc bug causes parted to write bad GPT entries, Matt_Domsch, 2002/03/19
- RE: gcc bug causes parted to write bad GPT entries, Matt_Domsch, 2002/03/19