From: "rob pike, esq." <rob@mightycheese.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] fd2path(2)
Date: Mon, 5 May 2003 09:18:55 -0700 [thread overview]
Message-ID: <6b1434ce54eef6452e6ae212a0faebe5@mightycheese.com> (raw)
In-Reply-To: <20030505160003.GA27502@wilbur.25thandClement.com>
> why not make the return value of fd2path() similar to SUSv3's snprintf()?
> that is, return the length of the logical string. i've read a few archived
> posts on this. one was to make the return value the remainder of the logical
> length and the buffer length. another pointed out that inferno just returned
> a malloc'd string on its own.
Perhaps it's a better interface, making it like read. I don't
remember thinking about it, which probably means I just gave it the
default syscall return. I do remember thinking about the NUL on the
end, which probably means I didn't think it was the same as read.
On the other hand, a quick grep shows most program just use the string
outright and strlen() is really cheap. I suspect that between the two
of us we've spent more time talking about it than using strlen() on an
fd2path call will require in our lifetimes.
-rob
next prev parent reply other threads:[~2003-05-05 16:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-05 16:00 William Ahern
2003-05-05 16:18 ` rob pike, esq. [this message]
2003-05-05 17:32 ` William Ahern
2003-05-05 18:05 ` William Josephson
2003-05-05 18:12 ` rsc
2003-05-05 18:17 ` William Ahern
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=6b1434ce54eef6452e6ae212a0faebe5@mightycheese.com \
--to=rob@mightycheese.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).