Bug#397632: gpart does not work on amd64

Petr Salinger Petr.Salinger at seznam.cz
Thu Oct 2 08:42:25 UTC 2008


the current version does not work on amd64.
There are at least two problems.

1) check for endianity
    you should put into gpart.h something like

   #include <endian.h>

   #if defined(__BYTE_ORDER) && (__BYTE_ORDER == __BIG_ENDIAN)
   #elif defined(__BYTE_ORDER) && (__BYTE_ORDER == __LITTLE_ENDIAN)
   #error unknown endian

2) there is used long type inside structures coming directly from disk
    at least in dos_part_entry, p_start and p_size should be uint32_t


More information about the forensics-devel mailing list