9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: arisawa@vega.aichi-u.ac.jp arisawa@vega.aichi-u.ac.jp
Subject: [9fans] A patch for ftp
Date: Fri,  5 Dec 1997 10:57:52 +0900	[thread overview]
Message-ID: <19971205015752.XNHQ-hyrAv3XXLUmQAGF6fq28h_cbJyXt5SsQIeI6N0@z> (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




                 reply	other threads:[~1997-12-05  1:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19971205015752.XNHQ-hyrAv3XXLUmQAGF6fq28h_cbJyXt5SsQIeI6N0@z \
    --to=arisawa@vega.aichi-u.ac.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).