From 965c7ff9a9d64bb53dd7a808f3193b36ab7b014d Mon Sep 17 00:00:00 2001 From: sr Date: Sat, 25 Aug 2012 16:14:20 +0200 Subject: [*] Fix bug in serializer_get_* [CLIENT/KERNEL] Change ioctl to handle volume names instead if vids [*] Make protocol endian safe [CLIENT] Display ioctl errorcode on failure --- src/types.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/types.h') diff --git a/src/types.h b/src/types.h index 5332dc4..6ba7629 100644 --- a/src/types.h +++ b/src/types.h @@ -44,6 +44,7 @@ const uint16_t dnbd3_packet_magic = (0x73 << 8) | (0x72); (a).cmd = net_order_16((a).cmd); \ (a).size = net_order_32((a).size); \ } while (0) +#define ENDIAN_MODE "Big Endian" #elif defined(__LITTLE_ENDIAN__) || (defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && __BYTE_ORDER == __LITTLE_ENDIAN) || (defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) static const uint16_t dnbd3_packet_magic = (0x73) | (0x72 << 8); // Make little endian our network byte order as probably 99.999% of machines this will be used on are LE @@ -52,6 +53,7 @@ static const uint16_t dnbd3_packet_magic = (0x73) | (0x72 << 8); #define net_order_16(a) (a) #define fixup_request(a) while(0) #define fixup_reply(a) while(0) +#define ENDIAN_MODE "Little Endian" #else #error "Unknown Endianness" #endif -- cgit v1.2.3-55-g7522