git: 9front

Download patch

ref: 8ec7f79d03b498f2288221e32c4bc0f1ead4d8df
parent: 0fdf9345d3f0fa4f4d36b01ae6ce9aac6a917ab8
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Wed Aug 16 11:16:40 EDT 2023

ip/ftpfs: fix totally broken messagesize, use IOUNIT

--- a/sys/src/cmd/ip/ftpfs/ftpfs.c
+++ b/sys/src/cmd/ip/ftpfs/ftpfs.c
@@ -19,9 +19,9 @@
 Fid	*fids;			/* linked list of fids */
 char	errstring[128];		/* error to return */
 int	mfd;			/* fd for 9fs */
-int	messagesize = 4*1024*IOHDRSZ;
-uchar	mdata[8*1024*IOHDRSZ];
-uchar	mbuf[8*1024*IOHDRSZ];
+int	messagesize = IOUNIT+IOHDRSZ;
+uchar	mdata[IOUNIT+IOHDRSZ];
+uchar	mbuf[IOUNIT];
 Fcall	rhdr;
 Fcall	thdr;
 int	debug;
@@ -648,7 +648,7 @@
 fatal(char *fmt, ...)
 {
 	va_list arg;
-	char buf[8*1024];
+	char buf[1024];
 
 	dying = 1;
 
--- a/sys/src/cmd/ip/ftpfs/ftpfs.h
+++ b/sys/src/cmd/ip/ftpfs/ftpfs.h
@@ -107,6 +107,4 @@
 #define TIMEOUT 5*60
 #define DMSYML 0x10000000
 
-#define MAXFDATA 8192
-
 extern char	net[];		/* network for connections */
--