From c791d83a625867b45d32f3d64fc279ecc65aba56 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 10 Nov 2010 13:53:50 +0100 Subject: fix some compile issues --- tools/adk/pt.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'tools') diff --git a/tools/adk/pt.c b/tools/adk/pt.c index e98550b31..6f2e7ce25 100644 --- a/tools/adk/pt.c +++ b/tools/adk/pt.c @@ -42,19 +42,6 @@ #define BLKGETSIZE DKIOCGETBLOCKCOUNT #endif -#define bswap16(x) ( \ - ((((x) )&(unsigned int)0xff)<< 8) \ - |((((x)>> 8)&(unsigned int)0xff) ) \ -) - -#if __BYTE_ORDER == __BIG_ENDIAN -#define cpu_to_le16(x) bswap16(x) -#elif __BYTE_ORDER == __LITTLE_ENDIAN -#define cpu_to_le16(x) (x) -#else -#error unknown endianness! -#endif - /* Partition table entry */ struct pte { unsigned char active; @@ -166,9 +153,9 @@ static int gen_ptable(int nr) } pte[i].active = ((i + 1) == active) ? 0x80 : 0; pte[i].type = parts[i].type; - pte[i].start = cpu_to_le16(start = sect + sectors); + pte[i].start = start = sect + sectors; sect = round_to_cyl(start + parts[i].size * 2); - pte[i].length = cpu_to_le16(len = sect - start); + pte[i].length = len = sect - start; to_chs(start, pte[i].chs_start); to_chs(start + len - 1, pte[i].chs_end); if (verbose) -- cgit v1.2.3