xfs
[Top] [All Lists]

Re: [PATCH v2 4/4] xfsprogs: OS X partial support

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH v2 4/4] xfsprogs: OS X partial support
From: Jan Tulak <jtulak@xxxxxxxxxx>
Date: Mon, 27 Jul 2015 12:45:46 -0400 (EDT)
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20150726163438.GD16659@xxxxxxxxxxxxx>
References: <1437397018-12864-1-git-send-email-jtulak@xxxxxxxxxx> <1437397018-12864-5-git-send-email-jtulak@xxxxxxxxxx> <20150726163438.GD16659@xxxxxxxxxxxxx>
Thread-index: MN7P2591asoQERs6D/ySGO5maUdJhA==
Thread-topic: xfsprogs: OS X partial support

----- Original Message -----
> From: "Christoph Hellwig" <hch@xxxxxxxxxxxxx>
> To: "Jan Tulak" <jtulak@xxxxxxxxxx>
> Cc: xfs@xxxxxxxxxxx
> Sent: Sunday, July 26, 2015 6:34:38 PM
> Subject: Re: [PATCH v2 4/4] xfsprogs: OS X partial support
> 
> I think this needs to be split into one patch per issue.  A few comments
> below:

Sure, I guess it is a good idea.

> 
> > -#include <malloc.h>
> 
> 
> malloc and friends need to be in stdlib.h per Posix, so the right
> fix is to drop every include of malloc.h and mae sure we include
> stdlib.h where needed.
> 

stdlib.h contains posix_memalign(), but the code is using memalign(). 
So should I prefix the calls?

Regarding the autoconf related issues, I'm looking on it, though it
can take me some time. I can't say I love the way autoconf is done... :)

[ snip autoconf related issues ]

> 
> > diff --git a/libxcmd/paths.c b/libxcmd/paths.c
> > index c0b1ddb..b360617 100644
> > --- a/libxcmd/paths.c
> > +++ b/libxcmd/paths.c
> > @@ -364,7 +364,7 @@ fs_table_initialise_mounts(
> >                     continue;
> >             if (!realpath(stats[i].f_mntfromname, rmntfromname))
> >                     continue;
> > -           if (!realpath(stats[i].f_mntonname, rmnttomname)))
> > +           if (!realpath(stats[i].f_mntonname, rmntonname))
> 
> I don't understand this change.

Typo fix, which wasn't catched earlier due to #ifdef branching.
The 'rmnttomname' does not exists anywhere and looks like a hybrid
between rmntfromname and rmntonname. And because the previous if has
has 'fromname' on both arguments of realpath, I choose the same approach
when fixing it.

I'm making it a standalone patch too, though.

Cheers,
Jan
-- 
Jan Tulak
jtulak@xxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>