summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom.h
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2002-09-13 10:33:10 +0000
committerphk <phk@FreeBSD.org>2002-09-13 10:33:10 +0000
commit0687f90dba5d628b9465c4c91626aec59638c29e (patch)
treea6c2aa2b6519a7f9c2a51850c254ca89d2a99ffb /sys/geom/geom.h
parente48c2b856016caaa98feb0c86f13098e44f4a725 (diff)
downloadFreeBSD-src-0687f90dba5d628b9465c4c91626aec59638c29e.zip
FreeBSD-src-0687f90dba5d628b9465c4c91626aec59638c29e.tar.gz
Add a couple more of the big/little-endian conversion routines and make
them visible from userland, if need be. I wish that the C language contained this as part of struct definintions, but failing that, I would settle for an agreed upon set of functions for packing/unpacking integers in various sizes from byte-streams which may have unfriendly alignment. This really belongs in <sys/endian.h> I guess.
Diffstat (limited to 'sys/geom/geom.h')
-rw-r--r--sys/geom/geom.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/sys/geom/geom.h b/sys/geom/geom.h
index 3bab33d..df7ecb5 100644
--- a/sys/geom/geom.h
+++ b/sys/geom/geom.h
@@ -178,12 +178,6 @@ void g_trace(int level, char *, ...);
# define G_T_BIO 2
# define G_T_ACCESS 4
-/* geom_enc.c */
-uint32_t g_dec_be2(u_char *p);
-uint32_t g_dec_be4(u_char *p);
-uint32_t g_dec_le2(u_char *p);
-uint32_t g_dec_le4(u_char *p);
-void g_enc_le4(u_char *p, uint32_t u);
/* geom_event.c */
void g_orphan_provider(struct g_provider *pp, int error);
@@ -298,4 +292,13 @@ extern struct sx topology_lock;
#define GEOMGETCONF _IOWR('G', 0, struct sbuf)
+/* geom_enc.c */
+uint32_t g_dec_be2(u_char *p);
+uint32_t g_dec_be4(u_char *p);
+uint32_t g_dec_le2(u_char *p);
+uint32_t g_dec_le4(u_char *p);
+uint64_t g_dec_le8(u_char *p);
+void g_enc_le4(u_char *p, uint32_t u);
+void g_enc_le8(u_char *p, uint64_t u);
+
#endif /* _GEOM_GEOM_H_ */
OpenPOWER on IntegriCloud