9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] pptp.c install failed
@ 2001-11-12 21:49 Russ Cox
  2001-11-12 22:54 ` [9fans] pptp testing (was pptp.c install failed) William S .
  0 siblings, 1 reply; 9+ messages in thread
From: Russ Cox @ 2001-11-12 21:49 UTC (permalink / raw)
  To: 9fans

you shouldn't have to run ipconfig.  just do

ip/pptp [-s user:password] 1.2.3.4

where 1.2.3.4 is your pptp server.
it sets up the interface for you.

netstat -i

should show it.

russ



^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: [9fans] pptp.c install failed
@ 2001-11-11 21:32 Russ Cox
  0 siblings, 0 replies; 9+ messages in thread
From: Russ Cox @ 2001-11-11 21:32 UTC (permalink / raw)
  To: 9fans

> Why not ``rerrstr(char *buf, int size)''?
> Or even ``rerrstr(Str buf)''?
>
> C needs a counted array type, but until then we shouldn't
> cut corners.

As part of the 9P2000 changes, we fixed both errstr and
rerrstr as you suggest:

	int errstr(char *err, uint nerr)
	void rerrstr(char *err, uint nerr)

ERRMAX takes the place of ERRLEN, but it is a convention
rather than a specification: if you use one that is too big
or too small, the safety of your program isn't put in jeopardy.

Thus the code in question originally read:

	void
	ewrite(int fd, void *buf, int nbuf)
	{
		char e[ERRMAX], path[64];

		if(write(fd, buf, nbuf) != nbuf){
			rerrstr(e, sizeof e);
			strcpy(path, "unknown");
			fd2path(fd, path, sizeof path);
			myfatal("write %d to %s: %s", nbuf, path, e);
		}
	}

which I think you wouldn't have any problems with.

I did think about posting an rerrstr(char*, uint), but
our rerrstr uses utfecpy to make sure it truncates at
a character boundary, and that function is post-distribution
too, so I stopped the cascade by assuming ERRLEN: since
the distribution errstr already does it, I don't see a problem
doing it in other places until we get a proper distribution out.

Russ




^ permalink raw reply	[flat|nested] 9+ messages in thread
[parent not found: <rsc@plan9.bell-labs.com>]
* [9fans] pptp.c install failed
@ 2001-11-11 18:54 William S .
  0 siblings, 0 replies; 9+ messages in thread
From: William S . @ 2001-11-11 18:54 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 111 bytes --]

I attempted to install pptp.c as below but
it failed. Any way to make it install?

Bill
Amsterdam, NL



[-- Attachment #2: error.txt --]
[-- Type: text/plain, Size: 289 bytes --]

term% mk pptp.install
8c -FVw pptp.c
pptp.c:92 function args not checked: threadnonotes
pptp.c:671 name not declared: ERRMAX
pptp.c:671 array size must be a positive constant
pptp.c:674 function args not checked: rerrstr
mk: 8c -FVw pptp.c  : exit status=rc 2929:8c 2931:error
term%

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2001-11-12 22:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-12 21:49 [9fans] pptp.c install failed Russ Cox
2001-11-12 22:54 ` [9fans] pptp testing (was pptp.c install failed) William S .
  -- strict thread matches above, loose matches on Subject: below --
2001-11-11 21:32 [9fans] pptp.c install failed Russ Cox
     [not found] <rsc@plan9.bell-labs.com>
2001-11-11 20:35 ` Russ Cox
2001-11-11 21:17   ` Scott Schwartz
2001-11-11 23:25     ` Dan Cross
2001-11-12 11:42     ` Boyd Roberts
2001-11-12 18:13   ` William S .
2001-11-11 18:54 William S .

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).