Skip to contentSkip to conversation

__be'ify include/linux/nbd.h

PATCH New Alexey Dobriyan 1 participant 1 message Feb 18, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 __be'ify include/linux/nbd.h

Fix sparse warnings in drivers/block/nbd.c

include/linux/nbd.h +6 -6
Index: linux-warnings/include/linux/nbd.h
===================================================================
@@ -68,11 +68,11 @@
  * 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 @@
  * 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