Skip to content

Commit

Permalink
9p: add P9_ERRMAX for 9p2000 and 9p2000.u
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christian Schoenebeck authored and Dominique Martinet committed Oct 4, 2022
1 parent e7c6219 commit 58d3313
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/net/9p/9p.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 58d3313

Please sign in to comment.