* [9fans] A patch for ftp
@ 1997-12-05 1:57 arisawa
0 siblings, 0 replies; only message in thread
From: arisawa @ 1997-12-05 1:57 UTC (permalink / raw)
Hello 9fans
This is a patch to /sys/src/cmd/service/ftp.c
The patch includes:
1. bug fix to:
tcp!port messgae
This problem is already spoken elsewhere.
2. bug fix to:
ls -l
I announced previously.
3. support size command
New patch
4. put "/" after directory names
New patch
Change the source to work it:
term% diff ftp.c.orig ftp.c
62a63
> int sizecmd(char*);
102a104
> { "size", sizecmd, },
673c675
< sprint(buf, "tcp!%d", port);
---
> sprint(buf, "tcp!*!%d", port);
753c755,756
< n += sprint(buf+n, "%s", name);
---
> if(d->mode & CHDIR) n += sprint(buf+n, "%s/", name);
> else n += sprint(buf+n, "%s", name);
898,899c901,902
< if(Cflag)
< lflag = 0;
---
> if(lflag)
> Cflag = 0;
1532a1536,1545
> }
>
> int
> sizecmd(char *file)
> { Dir edir;
> if(stat(file,(char*)&edir))
> return reply("550 %s: No such file or directory.",file);
> if(edir.mode & CHDIR) /* directory */
> return reply("550 %s: not a plain file.",file);
> return reply("213 %lld",edir.vlength);
You can get this boddle from:
ftp://plan9.aichi-u.ac.jp/netlib/patchs/ftp.bod
Kenji Arisawa
E-mail: arisawa@aichi-u.ac.jp
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1997-12-05 1:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-12-05 1:57 [9fans] A patch for ftp arisawa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).