9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: rog@vitanuova.com
To: 9fans@cse.psu.edu
Subject: Re: [9fans] experimental change for devmnt to deal with spaces
Date: Wed,  3 Jul 2002 22:38:24 +0100	[thread overview]
Message-ID: <20020703213236.7E3AD19A0D@mail.cse.psu.edu> (raw)

> What's the problem? Any of you must be aware of something I'm missing.

to continue with the upas/fs example, here's a function that opens a
mailbox and returns a pathname that can be used to access the messages
therein:

void
openmbox(char *path, char *name, char result[])
{
	fprint(open("/mail/fs/ctl", OWRITE), "open %q %q", path, name);
	sprint(result, "/mail/fs/%s", name);
}

imagine the function being called as follows:

{
	char buf[65536];
	openmbox("/mail/box/rog/mbox", "My\x00A0Mailbox", buf);
}

assuming upas/fs doesn't do the same character translation as the
mount driver, any subsequent code that tries to use the returned path
will fail, as the mailbox will have been created in upas/fs's internal
data structures *with* the 0xa0 character; however the mount driver
prevents that character from getting through.

to my mind, the fact that a pure plan 9 program has to be aware of
this convention to work correctly seems to indicate that the best
solution is at the boundaries of the system - i.e.  whereever a plan 9
fileserver interacts with an external name.

that keeps internal invariants simple, and the potential for peril low.

  rog.



             reply	other threads:[~2002-07-03 21:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-03 21:38 rog [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-07-03 17:52 rog
2002-07-03 20:37 ` FJ Ballesteros
2002-07-03 12:40 Fco.J.Ballesteros
2002-07-03 19:43 ` rob pike, esq.
2002-07-03 14:45   ` Lucio De Re
2002-07-03 15:42   ` FJ Ballesteros

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=20020703213236.7E3AD19A0D@mail.cse.psu.edu \
    --to=rog@vitanuova.com \
    --cc=9fans@cse.psu.edu \
    /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).