9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "EBo" <ebo@sandien.com>
To: "Fans of the OS Plan 9 from Bell Labs" <9fans@9fans.net>,
	"Skip Tavakkolian" <9nut@9netics.com>
Subject: Re: [9fans] 9vx patch to read environment var PLAN9
Date: Mon, 12 Apr 2010 23:20:39 -0600	[thread overview]
Message-ID: <twig.1271136039.93205@swcp.com> (raw)
In-Reply-To: <e3133b4aa2092177ec9aea2613499998@9netics.com>

Skip Tavakkolian <9nut@9netics.com> said:

> > but both
> > of the hard-coded paths in 9vx main.c are obviously in RSC's home directories
>
> it's not hardcoded;

What?  The findroot code reads:

static char*
findroot(void)
{
	static char cwd[1024];
	int i;
	char buf[1024];
	char *dir[] = {
		cwd,
		"/Users/rsc/9vx",
		"/home/rsc/plan9/4e"
	};

	if(getcwd(cwd, sizeof cwd) == nil){
		oserrstr();
		panic("getcwd: %r");
	}

	for(i=0; i<nelem(dir); i++){
		snprint(buf, sizeof buf, "%s/386/bin/rc", dir[i]);
		if(access(buf, 0) >= 0)
			return dir[i];
	}
	return nil;
}

"/Users/rsc/9vx","/home/rsc/plan9/4e" are most certainly hard coded locations,
and will likely only be default on rsc's machines.

> you can use -r as Russ said.  the difference is:
> "use default unless -r is given" vs.  "use default unless
> getenv(NINEROOT) is given".  -r makes it very obvious what the root is
> and probably will work better for un-unix-like environments.

Put another way, what are the default locations?

Also, it would probably be "use default unless getenv(NINEROOT) or -r is
given".  Also, getenv works on Windoz.  What un-unix-like environments are you
referring to?

> but at any rate, you have the sources and are free to change things
> locally to suit your taste.

true, but will these patches be accepted upstream?  If I was looking to just
build this for myself I would not be bothering any of you, I'm trying to
figure out what would be useful to include upstream.  I guess I should not
have posted this to the list, but simply taken it up with Russ off-list since
it is his code.

  EBo --





  reply	other threads:[~2010-04-13  5:20 UTC|newest]

Thread overview: 81+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-01 10:13 [9fans] how about intel D510MO Alex
2010-04-08  3:53 ` John Barham
2010-04-08 13:04   ` erik quanstrom
2010-04-11 17:06     ` [9fans] 9vx patch to read environment var PLAN9 EBo
2010-04-11 17:11       ` erik quanstrom
2010-04-11 17:24         ` Devon H. O'Dell
2010-04-11 17:30           ` erik quanstrom
2010-04-11 17:48             ` Devon H. O'Dell
2010-04-11 17:52               ` erik quanstrom
2010-04-11 21:01                 ` [9fans] /sys/lib/newuser patch EBo
2010-04-11 21:48                   ` erik quanstrom
2010-04-11 22:04                     ` EBo
2010-04-11 23:06                       ` Iruata Souza
2010-04-12  3:58                         ` EBo
2010-04-11 23:19                       ` Anthony Sorace
2010-04-12  3:49                         ` EBo
2010-04-12  5:34                         ` EBo
2010-04-12 12:28                           ` erik quanstrom
2010-04-12 13:13                             ` EBo
2010-04-12 13:28                             ` hiro
2010-04-12 13:37                               ` erik quanstrom
2010-04-12 14:11                                 ` hiro
2010-04-12 14:35                                   ` Devon H. O'Dell
2010-04-12 14:40                                     ` erik quanstrom
2010-04-12 15:01                                       ` Devon H. O'Dell
2010-04-12 15:28                                         ` erik quanstrom
2010-04-12 15:08                                       ` hiro
2010-04-12 15:23                                       ` hiro
2010-04-13  2:23                                         ` Anthony Sorace
2010-04-13  2:53                                           ` EBo
2010-04-13  3:14                                             ` Anthony Sorace
2010-04-13  3:23                                               ` EBo
2010-04-13  4:05                                                 ` EBo
2010-04-12 13:38                             ` EBo
2010-04-13 13:37                           ` maht
2010-04-13 13:59                             ` EBo
2010-04-11 18:03               ` [9fans] 9vx patch to read environment var PLAN9 EBo
2010-04-11 17:32         ` EBo
2010-04-11 17:42           ` Devon H. O'Dell
2010-04-11 17:47             ` EBo
2010-04-12  0:43       ` Russ Cox
2010-04-12  3:22         ` EBo
2010-04-12 10:46           ` Francisco J Ballesteros
2010-04-12 11:38             ` EBo
2010-04-12 12:36               ` erik quanstrom
2010-04-13  4:47               ` Skip Tavakkolian
2010-04-13  5:20                 ` EBo [this message]
2010-04-13  5:43                   ` Skip Tavakkolian
     [not found]                   ` <43c85712dd833ad7544f72b7c66a3b2e@9netics.com>
2010-04-13  6:19                     ` EBo
2010-04-13  6:33                       ` Skip Tavakkolian
2010-04-13  6:47                         ` EBo
2010-04-14 16:22                   ` Ethan Grammatikidis
2010-04-14 18:10                     ` EBo
2010-04-14 18:23                       ` Federico G. Benavento
2010-04-14 18:33                         ` lucio
2010-04-14 18:38                         ` EBo
2010-04-14 22:51                           ` Ethan Grammatikidis
2010-04-15  0:30                             ` Patrick Kelly
2010-04-15  4:32                               ` Russ Cox
2010-04-15  6:48                                 ` EBo
2010-04-15  8:26                                   ` Ethan Grammatikidis
2010-04-15  7:39                               ` EBo
2010-04-15  9:22                                 ` Ethan Grammatikidis
2010-04-15 13:55                                 ` Devon H. O'Dell
2010-04-15 14:01                                   ` EBo
2010-04-14 18:36                       ` erik quanstrom
2010-04-14 18:50                         ` EBo
2010-04-14 18:44                       ` Skip Tavakkolian
2010-04-14 19:01                         ` EBo
2010-04-15  8:44                     ` Balwinder S Dheeman
2010-04-15 10:11                       ` Ethan Grammatikidis
2010-04-15 13:06                         ` EBo
2010-04-15 14:29                         ` Balwinder S Dheeman
2010-04-15 15:38                           ` hiro
2010-04-16  7:52                             ` Ethan Grammatikidis
2010-04-16 12:08                               ` erik quanstrom
2010-04-16  8:20                           ` Ethan Grammatikidis
2010-04-16 10:57                             ` hiro
2010-04-26  8:43 ` [9fans] how about intel D510MO Pavel Klinkovsky
2010-04-15 16:52 [9fans] 9vx patch to read environment var PLAN9 Chad Brown
2010-04-15 17:03 ` erik quanstrom

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=twig.1271136039.93205@swcp.com \
    --to=ebo@sandien.com \
    --cc=9fans@9fans.net \
    --cc=9nut@9netics.com \
    /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).