summaryrefslogtreecommitdiff
path: root/lib9p
diff options
context:
space:
mode:
Diffstat (limited to 'lib9p')
-rwxr-xr-xlib9p/core.gen2
-rwxr-xr-xlib9p/idl/2010-9P2000.L.9p.gen2
-rw-r--r--lib9p/srv.c9
-rw-r--r--lib9p/srv_include/lib9p/srv.h9
4 files changed, 12 insertions, 10 deletions
diff --git a/lib9p/core.gen b/lib9p/core.gen
index b30ec31..24f66de 100755
--- a/lib9p/core.gen
+++ b/lib9p/core.gen
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# lib9p/core.gen - Generate C marshalers/unmarshalers for .9p files
# defining 9P protocol variants.
#
diff --git a/lib9p/idl/2010-9P2000.L.9p.gen b/lib9p/idl/2010-9P2000.L.9p.gen
index cb32585..f0bdb6b 100755
--- a/lib9p/idl/2010-9P2000.L.9p.gen
+++ b/lib9p/idl/2010-9P2000.L.9p.gen
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# lib9p/idl/2010-9P2000.L.9p.gen - Generate definitions of 9P2000.L messages
import sys
diff --git a/lib9p/srv.c b/lib9p/srv.c
index 56fc3ec..32e9a9a 100644
--- a/lib9p/srv.c
+++ b/lib9p/srv.c
@@ -61,6 +61,15 @@ void lib9p_srv_acknowledge_flush(struct lib9p_srv_ctx *ctx) {
/* structs ********************************************************************/
+void lib9p_srv_stat_assert(struct lib9p_srv_stat stat) {
+ assert( ((bool)(stat.mode & LIB9P_DM_DIR )) == ((bool)(stat.qid.type & LIB9P_QT_DIR )) );
+ assert( ((bool)(stat.mode & LIB9P_DM_APPEND)) == ((bool)(stat.qid.type & LIB9P_QT_APPEND)) );
+ assert( ((bool)(stat.mode & LIB9P_DM_EXCL )) == ((bool)(stat.qid.type & LIB9P_QT_EXCL )) );
+ assert( ((bool)(stat.mode & LIB9P_DM_AUTH )) == ((bool)(stat.qid.type & LIB9P_QT_AUTH )) );
+ assert( ((bool)(stat.mode & LIB9P_DM_TMP )) == ((bool)(stat.qid.type & LIB9P_QT_TMP )) );
+ assert( (stat.size == 0) || !(stat.mode & LIB9P_DM_DIR) );
+}
+
enum srv_filetype {
SRV_FILETYPE_FILE,
SRV_FILETYPE_DIR,
diff --git a/lib9p/srv_include/lib9p/srv.h b/lib9p/srv_include/lib9p/srv.h
index c40c85a..eb87d6f 100644
--- a/lib9p/srv_include/lib9p/srv.h
+++ b/lib9p/srv_include/lib9p/srv.h
@@ -96,14 +96,7 @@ struct lib9p_srv_stat {
#endif
};
-static inline void lib9p_srv_stat_assert(struct lib9p_srv_stat stat) {
- assert( ((bool)(stat.mode & LIB9P_DM_DIR )) == ((bool)(stat.qid.type & LIB9P_QT_DIR )) );
- assert( ((bool)(stat.mode & LIB9P_DM_APPEND)) == ((bool)(stat.qid.type & LIB9P_QT_APPEND)) );
- assert( ((bool)(stat.mode & LIB9P_DM_EXCL )) == ((bool)(stat.qid.type & LIB9P_QT_EXCL )) );
- assert( ((bool)(stat.mode & LIB9P_DM_AUTH )) == ((bool)(stat.qid.type & LIB9P_QT_AUTH )) );
- assert( ((bool)(stat.mode & LIB9P_DM_TMP )) == ((bool)(stat.qid.type & LIB9P_QT_TMP )) );
- assert( (stat.size == 0) || !(stat.mode & LIB9P_DM_DIR) );
-}
+void lib9p_srv_stat_assert(struct lib9p_srv_stat stat);
/* interface definitions ******************************************************/