Linux PARISC architecture development
 help / color / mirror / Atom feed
From: Matthew Wilcox <Matthew.Wilcox@genedata.com>
To: parisc-linux@thepuffingroup.com
Subject: [parisc-linux] getdents
Date: Wed, 3 Nov 1999 03:11:52 +0100	[thread overview]
Message-ID: <19991103031152.F25252@mencheca.ch.genedata.com> (raw)


I'm trying to implement the HPUX getdents syscall so that we can `-ls'
in sash.  Unfortunately, there appears to be no manual page on this.
Could someone let me know exactly what libc is expecting getdents
to return?  So far I have deduced the following:

It takes three parameters; a file descriptor, an address and a length
in bytes.  On return, that block of memory is filled with as many of
the following struct as will fit:

struct hpux_dirent {
	ino_t	d_ino;
	short	d_reclen;
	short	d_namlen;
	char	d_name[1];
};

But checking through the other compatibility implementations of getdents;
there is so much variation about what else might be returned in that
block that I would prefer to not speculate further unless I have to.

-- 
Matthew Wilcox <willy@bofh.ai>
"Windows and MacOS are products, contrived by engineers in the service of
specific companies. Unix, by contrast, is not so much a product as it is a
painstakingly compiled oral history of the hacker subculture." - N Stephenson

             reply	other threads:[~1999-11-03  2:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-11-03  2:11 Matthew Wilcox [this message]
1999-11-04  1:12 ` [parisc-linux] getdents Kevin Vajk
1999-11-04  1:29   ` Kevin Vajk
1999-11-04  1:43     ` Matthew Wilcox
1999-11-04  5:52       ` Grant Grundler
1999-11-04  1:39   ` Matthew Wilcox

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=19991103031152.F25252@mencheca.ch.genedata.com \
    --to=matthew.wilcox@genedata.com \
    --cc=parisc-linux@thepuffingroup.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