Re: [PATCH 02/12] libxfs: move topology declarations into separate header

Dave Chinner
2019-08-30T05:43:08Z

On Tue, Aug 20, 2019 at 01:31:24PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
>
> The topology functions live in libfrog now, which means their
> declarations don't belong in libxcmd.h. Create new header file for
> them.
>
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
> include/libxcmd.h | 31 -------------------------------
> include/topology.h | 39 +++++++++++++++++++++++++++++++++++++++
> libfrog/topology.c | 1 +
> mkfs/xfs_mkfs.c | 2 +-
> repair/sb.c | 1 +
> 5 files changed, 42 insertions(+), 32 deletions(-)
> create mode 100644 include/topology.h

I like the idea, but I'm wondering if we should have a similar
setup to libxfs header files here.

i.e. the header file lives in libfrog/, and the install-headers make
command creates include/libxfrog and links them for the build. That
way the includes become namespaced like:

#include "libxfrog/topology,h"

and we don't pollute include with random header files from all
different parts of xfsprogs...

Cheers,

Dave.
--
Dave Chinner
david@fromorbit.com