qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 05/13] 9p: darwin: Handle struct dirent differen


From: Greg Kurz
Subject: Re: [Qemu-devel] [PATCH 05/13] 9p: darwin: Handle struct dirent differences
Date: Thu, 31 May 2018 21:16:35 +0200

On Thu, 31 May 2018 12:20:28 -0400
Keno Fischer <address@hidden> wrote:

> >> diff --git a/hw/9pfs/9p-synth.c b/hw/9pfs/9p-synth.c
> >> index eb68b42..3c0a6d8 100644
> >> --- a/hw/9pfs/9p-synth.c
> >> +++ b/hw/9pfs/9p-synth.c
> >> @@ -221,7 +221,11 @@ static void synth_direntry(V9fsSynthNode *node,
> >>  {
> >>      strcpy(entry->d_name, node->name);
> >>      entry->d_ino = node->attr->inode;
> >> +#ifdef CONFIG_DARWIN
> >> +    entry->d_seekoff = off + 1;  
> >
> > Hmm... what's that for ? No users in the patchset and the comment
> > below seem to indicate this wouldn't be trusted anyway.  
> 
> d_off isn't available on Darwin, so an appropriate ifdef
> is required here anyway. I figured if the offset is available
> anyway, I might as well set it, but I can drop
> this code path if you would prefer.
> 

Yeah I think I prefer you drop it.

> >> +        off_t off = v9fs_co_telldir(pdu, fidp);  
> >
> > Please declare local variables at the beginning of the function. Also,
> > v9fs_co_telldir() can fail. This requires proper error handling.  
> 
> Will do.
> 
> >> +#else
> >> +        off_t off = dent->d_off;
> >> +#endif  
> >
> > Please make this a helper and call it in v9fs_do_readdir_with_stat() as 
> > well.
> >  
> 
> Will do.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]