Only in tpip-1.2: oldkern Binary files tpip-1.2.orig/tpip and tpip-1.2/tpip differ diff -ru tpip-1.2.orig/tpip.c tpip-1.2/tpip.c --- tpip-1.2.orig/tpip.c 2004-01-11 20:27:01.000000000 -0800 +++ tpip-1.2/tpip.c 2007-03-29 02:09:44.000000000 -0700 @@ -42,6 +42,9 @@ #ifdef __linux__ # include # include +#else +#include +#include #endif #if BYTE_ORDER == BIG_ENDIAN @@ -336,7 +339,7 @@ } if (bootpage->signature == TIVO_BOOT_MAGIC) { TIVO_BYTE_ORDER = HOST_BYTE_ORDER; - } else if (bootpage->signature == cpu_to_be16(TIVO_BOOT_MAGIC)) { + } else if (bootpage->signature == cpu_to_le16(TIVO_BOOT_MAGIC)) { /* TiVo disk is byte-swapped */ #if HOST_BYTE_ORDER == BIG_ENDIAN TIVO_BYTE_ORDER = LITTLE_ENDIAN; @@ -346,8 +349,10 @@ swab((char *)&bpbuf[0], (char *)&bpbuf[1], sizeof(struct tcdbootpage)); bootpage = &bpbuf[1]; - } else if (bootpage->signature != TIVO_BOOT_MAGIC) + } else if (bootpage->signature != TIVO_BOOT_MAGIC) { + printf("Expected 0x%x or 0x%x\n", TIVO_BOOT_MAGIC, cpu_to_be16(TIVO_BOOT_MAGIC)); errx(1, "unknown bootpage signature: 0x%x", bootpage->signature); + } switch (series) { case 1: SWAP_BYTE_ORDER = BIG_ENDIAN;