Skip to contentSkip to conversation

9p: in-kernel server basic support

PATCH In review Latchesar Ionkov 1 participant 1 message Nov 2, 2007

Subsystems (3)
lore
Share & tools
lore

Latchesar Ionkov

author maintainer
#0 lore raw

PATCH 6/10 9p: in-kernel server basic support

This patch implements the basic functionality required for implementing in-kernel 9P file servers.

---
 include/net/9p/9p.h  |    2 +
 include/net/9p/srv.h |  169 +++++++
 net/9p/Kconfig       |    5 +
 net/9p/Makefile      |    4 +
 net/9p/fcprint.c     |    2 +
 net/9p/srv.c         | 1283 ++++++++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 1465 insertions(+), 0 deletions(-)
include/net/9p/9p.h +2 -0
index f7bd839..a913cdb 100644
@@ -65,6 +65,7 @@ do { \
 
 /* Message Types */
 enum {
+	P9_FIRST = 100,
 	P9_TVERSION = 100,
 	P9_RVERSION,
 	P9_TAUTH = 102,
@@ -93,6 +94,7 @@ enum {
 	P9_RSTAT,
 	P9_TWSTAT = 126,
 	P9_RWSTAT,
+	P9_LAST,
 };
 
 /* open modes */
include/net/9p/srv.h new file +169 -0

169 lines not on this page · raw message

net/9p/Kconfig +5 -0
index bafc50c..8a3ff32 100644
@@ -23,6 +23,11 @@ config NET_9P_FD
 	  file descriptors.  TCP/IP is the default transport for 9p,
 	  so if you are going to use 9p, you'll likely want this.
 
+config NET_9P_SRV
+	tristate "9P server support"
+	depends on NET_9P
+	help
+	  Say Y if you want the 9P server support
 config NET_9P_VIRTIO
 	depends on NET_9P && EXPERIMENTAL && VIRTIO
 	tristate "9P Virtio Transport (Experimental)"
net/9p/Makefile +4 -0
index 87c0fa5..106a596 100644
@@ -1,5 +1,6 @@
 obj-$(CONFIG_NET_9P) := 9pnet.o
 obj-$(CONFIG_NET_9P_FD) += 9pnet_fd.o
+obj-$(CONFIG_NET_9P_SRV) += 9psrv.o
 obj-$(CONFIG_NET_9P_VIRTIO) += 9pnet_virtio.o
 
 9pnet-objs := \
@@ -10,6 +11,9 @@ obj-$(CONFIG_NET_9P_VIRTIO) += 9pnet_virtio.o
 	fcprint.o \
 	util.o \
 
+9psrv-objs := \
+	srv.o \
+
 9pnet_fd-objs := \
 	mux.o \
 
net/9p/fcprint.c +2 -0
index b1ae8ec..3c5cd83 100644
@@ -347,8 +347,10 @@ p9_printfcall(char *buf, int buflen, struct p9_fcall *fc, int extended)
 
 	return ret;
 }
+EXPORT_SYMBOL(p9_printfcall);
 
 #else
+
 int
 p9_printfcall(char *buf, int buflen, struct p9_fcall *fc, int extended)
 {
net/9p/srv.c new file +1283 -0

1,283 lines not on this page · raw message