shithub: riscv

Download patch

ref: 0f56516d9cee6b74ea56a3963fa2b508f286c63f
parent: fcd5c498922230021966a389f09622656f7dd563
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 */