ref: ab916bc831b8a68da981bfc79c94ef721be3bb4e
parent: 96d32547233ded9a7560967a2b5e5a4ceb7fcde8
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Nov 2 11:35:18 EST 2025
devmnt: Don't spam the console with mountio errors Add constant Emsize = "message size too small". When convS2M() fails because of negotiated message size being too small, raise Emsize instead of Emountrpc. This can happen when waking large file-name that exceeds the negotiated message size of the 9p channel.
--- a/sys/src/9/port/devmnt.c
+++ b/sys/src/9/port/devmnt.c
@@ -1044,11 +1044,8 @@
nexterror();
}
n = convS2M(&r->request, b->wp, n);
- if(n <= 0 || n > m->msize) {- print("mountio: proc %s %lud: convS2M returned %d for tag %d fid %d T%d\n",- up->text, up->pid, n, r->request.tag, r->request.fid, r->request.type);
- error(Emountrpc);
- }
+ if(n <= 0 || n > m->msize)
+ error(Emsize);
b->wp += n;
if(r->request.type == Twrite && cachedchan(r->c))
r->w = copyblock(b, n);
--- a/sys/src/9/port/error.h
+++ b/sys/src/9/port/error.h
@@ -52,3 +52,4 @@
extern char Edirseek[]; /* seek in directory */
extern char Etoolong[]; /* name too long */
extern char Echange[]; /* media or partition has changed */
+extern char Emsize[]; /* message size too small */
--
⑨