Package: mac-fdisk
Version: 0.1-13

On the experimental Debian-PPC64
(http://debian-ppc64.alioth.debian.org/), mac-fdisk fails on
initialization.

banana:~# mac-fdisk 
(null): Size of partion map entry (944) is not equal to block size
(512)

source is in pdisk.c:

    if (sizeof(DPME) != PBLOCK_SIZE) {
        fatal(-1, "Size of partion map entry (%d) "
                "is not equal to block size (%d)\n",
                sizeof(DPME), PBLOCK_SIZE);
    }

There are 3 independent bugs which cause this malfunction:

1. in dpme.h, "u32" is defined as "unsigned long", which is 64 bits
   wide on ppc64 - I believe "unsigned int" should be safe on all
   relevant platforms, or just use the C99 types (u_int32_t).

2. "struct dpme" is not packed, and its members are set to the wrong
   alignment on ppc64

3. "struct dpme" contains several pointers, which are also 64 bits
   wide on ppc64.  Who writes this kind of code??



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to