[prev in list] [next in list] [prev in thread] [next in thread]
List: fuse-devel
Subject: Re: [fuse-devel] problem with 'find' recursion
From: Miklos Szeredi <miklos () szeredi ! hu>
Date: 2007-04-22 7:43:50
Message-ID: E1HfWje-0004DS-00 () dorka ! pomaz ! szeredi ! hu
[Download RAW message or body]
> On Fri, 2007-04-20 at 20:40 +0200, Miklos Szeredi wrote:
> > > getdents64(4, {{d_ino=4294967295, d_off=32, d_type=DT_UNKNOWN,
> > > d_reclen=24, d_name="."} {d_ino=4294967295, d_off=64, d_type=DT_UNKNOWN,
> > > d_reclen=24, d_name=".."} {d_ino=4294967295, d_off=96, d_type=0x3 /*
> > > DT_??? */, d_reclen=24, d_name="test"} {d_ino=4294967295, d_off=128,
> > > d_type=DT_BLK, d_reclen=24, d_name="top"}}, 4096) = 96
> >
> > You're setting the st_mode to some bogus value, which presents itself
> > in bogus d_type fields.
> >
> > Miklos
>
> Well I got it fixed now, I don't actually understand why it works now..
> I changed the code in my readdir method to :
>
> st->st_mode = IFTODT(st->st_mode)
>
> before I'd just use the normal stat struct info (which is correct) as
> argument to the filler function, which resulted in the described
> problems.
That means, there are probably some mismaches between what each
library/program thinks about 'struct stat'. This can happen if for
example you are missing the "-D_FILE_OFFSET_BITS=64" compiler option.
> With the code changed as shown above it works.
That's just pure accident. The above code is totally wrong, the
IFTODT() is definitely not needed.
Miklos
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
fuse-devel mailing list
fuse-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fuse-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic