9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: arisawa <karisawa@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] p9p: 9 ls /dev
Date: Sat,  8 Apr 2017 15:21:47 +0900	[thread overview]
Message-ID: <4B168609-E25A-4D3C-9A80-1457BA0EE830@gmail.com> (raw)
In-Reply-To: <789A602E-FC47-40AE-96F4-64E2D2A5B375@orthanc.ca>

but how to?

unix doesn’t have something like fdreaddir(int fd).
my guess: russ unwillingly used a low level function such as
int getdirentries(int fd, char *buf, int nbytes, long *basep).

readdirall() might be OK in regular usage.


> 2017/04/08 13:06、Lyndon Nerenberg <lyndon@orthanc.ca> のメール:
> 
> 
>> On Apr 7, 2017, at 6:18 PM, arisawa <karisawa@gmail.com> wrote:
>> 
>> the problem comes from getdirentries() used in $P9P/src/lib9/dirread.c, I think.
>> 
>> man getdirentries(2) of OSX says:
> 
> And, dare I quote a Linux manpage, but getdirentries(3) there says:
> 
>> CONFORMING TO
>>       Not  in  POSIX.1-2001.   Present  on the BSDs, and a few other systems.
>>       Use opendir(3) and readdir(3) instead.
> 
> The fix should be simple enough.
> 
> --lyndon
> 
> 




  reply	other threads:[~2017-04-08  6:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-06 12:49 arisawa
2017-04-07  1:18 ` Lyndon Nerenberg
2017-04-08  1:18   ` arisawa
2017-04-08  4:06     ` Lyndon Nerenberg
2017-04-08  6:21       ` arisawa [this message]
2017-04-08  6:46         ` Ori Bernstein
2017-04-08  7:27           ` David Arroyo
2017-04-08  9:07             ` David Arroyo
2017-04-09  4:18               ` arisawa
2017-04-12  2:33                 ` arisawa
2017-04-12  7:05                   ` David Arroyo
2017-04-13  3:04                     ` arisawa

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=4B168609-E25A-4D3C-9A80-1457BA0EE830@gmail.com \
    --to=karisawa@gmail.com \
    --cc=9fans@9fans.net \
    /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).