nbd: add endian annotations
diff mbox series

Message ID 20051222214235.GA16883@mipter.zuzino.mipt.ru
State New, archived
Headers show
Series
  • nbd: add endian annotations
Related show

Commit Message

Alexey Dobriyan Dec. 22, 2005, 9:42 p.m. UTC
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Patch
diff mbox series

--- a/include/linux/nbd.h
+++ b/include/linux/nbd.h
@@ -68,11 +68,11 @@  struct nbd_device {
  * server. All data are in network byte order.
  */
 struct nbd_request {
-	u32 magic;
-	u32 type;	/* == READ || == WRITE 	*/
+	__be32 magic;
+	__be32 type;	/* == READ || == WRITE 	*/
 	char handle[8];
-	u64 from;
-	u32 len;
+	__be64 from;
+	__be32 len;
 }
 #ifdef __GNUC__
 	__attribute__ ((packed))
@@ -84,8 +84,8 @@  struct nbd_request {
  * it has completed an I/O request (or an error occurs).
  */
 struct nbd_reply {
-	u32 magic;
-	u32 error;		/* 0 = ok, else error	*/
+	__be32 magic;
+	__be32 error;		/* 0 = ok, else error	*/
 	char handle[8];		/* handle you got from request	*/
 };
 #endif