diff options
author | sr | 2012-08-25 16:14:20 +0200 |
---|---|---|
committer | sr | 2012-08-25 16:14:20 +0200 |
commit | 965c7ff9a9d64bb53dd7a808f3193b36ab7b014d (patch) | |
tree | 242cc32bf8f8dace2195a91ab286af970fc0d7a5 /src/types.h | |
parent | ... (diff) | |
download | dnbd3-965c7ff9a9d64bb53dd7a808f3193b36ab7b014d.tar.gz dnbd3-965c7ff9a9d64bb53dd7a808f3193b36ab7b014d.tar.xz dnbd3-965c7ff9a9d64bb53dd7a808f3193b36ab7b014d.zip |
[*] 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
Diffstat (limited to 'src/types.h')
-rw-r--r-- | src/types.h | 2 |
1 files changed, 2 insertions, 0 deletions
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 |