summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorChristian Schoenebeck <linux_oss@crudebyte.com>2022-07-15 23:32:30 +0200
committerDominique Martinet <asmadeus@codewreck.org>2022-10-05 07:05:41 +0900
commit58d331312bf78a10740fc3c6c370c98e8c53fa6b (patch)
treed6efd38f3164d0ffa03f04aaca10385af62d8b27 /include/net
parente7c6219778e46143ee9e68a25febac10a66383ae (diff)
9p: add P9_ERRMAX for 9p2000 and 9p2000.u
Add P9_ERRMAX macro to 9P protocol header which reflects the maximum error string length of Rerror replies for 9p2000 and 9p2000.u protocol versions. Unfortunately a maximum error string length is not defined by the 9p2000 spec, picking 128 as value for now, as this seems to be a common max. size for POSIX error strings in practice. 9p2000.L protocol version uses Rlerror replies instead which does not contain an error string. Link: https://lkml.kernel.org/r/3f23191d21032e7c14852b1e1a4ae26417a36739.1657920926.git.linux_oss@crudebyte.com Signed-off-by: Christian Schoenebeck <linux_oss@crudebyte.com> Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/9p/9p.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h
index 24a509f559ee..13abe013af21 100644
--- a/include/net/9p/9p.h
+++ b/include/net/9p/9p.h
@@ -331,6 +331,9 @@ enum p9_qid_t {
/* size of header for zero copy read/write */
#define P9_ZC_HDR_SZ 4096
+/* maximum length of an error string */
+#define P9_ERRMAX 128
+
/**
* struct p9_qid - file system entity information
* @type: 8-bit type &p9_qid_t