linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nbd: endian annotations
@ 2006-05-31 10:34 Alexey Dobriyan
  0 siblings, 0 replies; only message in thread
From: Alexey Dobriyan @ 2006-05-31 10:34 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Paul Clements, linux-kernel

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 include/linux/nbd.h |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

--- a/include/linux/nbd.h
+++ b/include/linux/nbd.h
@@ -75,15 +75,15 @@ struct nbd_device {
 /*
  * This is the packet used for communication between client and
  * 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))
 #endif
 ;
@@ -91,10 +91,10 @@ struct nbd_request {
 /*
  * This is the reply packet that nbd-server sends back to the client after
  * 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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-05-31 10:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-31 10:34 [PATCH] nbd: endian annotations Alexey Dobriyan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).