[PATCH] Re: Samba 3.0: vfs_netatalk.c
Anthony Liguori
aliguor at us.ibm.com
Tue Feb 11 21:27:14 GMT 2003
>If you read the code, then it's pretty obvious that we just need the
>entries in the directory - unsorted and one at a time. As such, my
>understanding it that we can re-implement as readdir().
See attachment
(See attached file: scandir.patch)
Anthony Liguori
Linux/Active Directory Interoperability
Linux Technology Center (LTC) - IBM Austin
E-mail: aliguor at us.ibm.com
Phone: (512) 838-1208
Tie Line: 678-1208
Andrew Bartlett <abartlet at samba.org>
Sent by: To: "Christopher R. Hertel" <crh at ubiqx.mn.org>
samba-technical-bounces+aliguor=us.ibm.com at list cc: Multiple recipients of list SAMBA-TECHNICAL
s.samba.org <samba-technical at samba.org>
Subject: Re: Samba 3.0: vfs_netatalk.c
02/11/2003 03:11 PM
On Wed, 2003-02-12 at 07:52, Christopher R. Hertel wrote:
> Paul Green wrote:
> > Anthony Liguori [mailto:aliguor at us.ibm.com] wrote:
> > >
> > > scandir() (and it's [alpha|version]sort() brethren) is a
BSD/Linux-ism
> > > and therefore isn't very portable. Since this is in a VFS module
(and
> > > therefore only optional) I guess this is ok.
> >
> > then Herb Lewis [mailto:herb at sgi.com] found this info:
> > > IRIX: scandir, scandir64, alphasort, alphasort64
> > > BSD: scandir, alphasort
> >
> > I just checked and neither scandir* nor alphasort* are in POSIX-1996 or
> > POSIX-2001. I'm not trying to build vfs_netatalk here on VOS, but if I
> > was, it looks like I'd be writing some code first. I don't consider
> > these functions portable either. My vote is for sticking with
functions
> > in POSIX if at all possible.
> >
> > PG
>
> I have not been following this thread closely, but it occurs to me that
we
> have tools that would make this easy to implement by hand. If I
> understand the docs, the goal is to create an array of pointers to
> directory entry structures (the latter allocated via malloc()).
>
> One catch is that there is a difference between BSD and System V
> implementations, but that's something that should be handle-able with
> ./configure. It seems to me that in either case the data could be sorted
> using the binary tree stuff or by qsort(). This should be fairly
do-able.
If you read the code, then it's pretty obvious that we just need the
entries in the directory - unsorted and one at a time. As such, my
understanding it that we can re-implement as readdir().
Andrew Bartlett
--
Andrew Bartlett abartlet at pcug.org.au
Manager, Authentication Subsystems, Samba Team abartlet at samba.org
Student Network Administrator, Hawker College abartlet at hawkerc.net
http://samba.org http://build.samba.org http://hawkerc.net
(See attached file: signature.asc)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scandir.patch
Type: application/octet-stream
Size: 1244 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20030211/f4a657da/scandir.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/octet-stream
Size: 196 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20030211/f4a657da/signature.obj
More information about the samba-technical
mailing list