diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2010-11-10 13:53:50 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2010-11-10 13:53:50 +0100 |
commit | c791d83a625867b45d32f3d64fc279ecc65aba56 (patch) | |
tree | 4aa1c052c2af5e81218cb5fa877c7a2f3ce45873 /tools | |
parent | a1f6fae37977577792379e6b8441538783f5b3ca (diff) |
fix some compile issues
Diffstat (limited to 'tools')
-rw-r--r-- | tools/adk/pt.c | 17 |
1 files changed, 2 insertions, 15 deletions
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) |