[PATCH v2 07/11] net: new function net_read_uint64

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Fri Feb 7 16:28:09 EST 2014


This is needed for nfs3 support as some types became bigger compared to
nfs2.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
---
 include/net.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/include/net.h b/include/net.h
index 8388e2f12ebe..6c86947d9ca3 100644
--- a/include/net.h
+++ b/include/net.h
@@ -276,6 +276,13 @@ static inline uint32_t net_read_uint32(void *from)
 	return tmp;
 }
 
+static inline uint64_t net_read_uint64(void *from)
+{
+	uint64_t tmp;
+	memcpy(&tmp, from, sizeof(tmp));
+	return tmp;
+}
+
 /* write IP *in network byteorder* */
 static inline void net_write_ip(void *to, IPaddr_t ip)
 {
-- 
1.8.5.2




More information about the barebox mailing list