diff mbox series

[01/12] libxfs-diff: try harder to find the kernel equivalent libxfs files

Message ID 156633307795.1215978.8644291951311062567.stgit@magnolia (mailing list archive)
State New, archived
Headers show
Series xfsprogs-5.3: various fixes | expand

Commit Message

Darrick J. Wong Aug. 20, 2019, 8:31 p.m. UTC
From: Darrick J. Wong <darrick.wong@oracle.com>

Now that we're syncing userspace libxfs/ files with kernel fs/xfs/
files, teach the diff tool to try fs/xfs/xfs_foo.c if
fs/xfs/libxfs/xfs_foo.c doesn't exist.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 tools/libxfs-diff |    1 +
 1 file changed, 1 insertion(+)

Comments

Dave Chinner Aug. 30, 2019, 5:38 a.m. UTC | #1
On Tue, Aug 20, 2019 at 01:31:17PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> Now that we're syncing userspace libxfs/ files with kernel fs/xfs/
> files, teach the diff tool to try fs/xfs/xfs_foo.c if
> fs/xfs/libxfs/xfs_foo.c doesn't exist.

I'd prefer we have a strategy that moves fs/xfs files to
fs/xfs/libxfs once they are synced instead of breaking the "files
in libxfs/ are the same in both user and kernel space" rule we set
for libxfs...

Cheers,

Dave.
Darrick J. Wong Aug. 30, 2019, 5:40 a.m. UTC | #2
On Fri, Aug 30, 2019 at 03:38:12PM +1000, Dave Chinner wrote:
> On Tue, Aug 20, 2019 at 01:31:17PM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <darrick.wong@oracle.com>
> > 
> > Now that we're syncing userspace libxfs/ files with kernel fs/xfs/
> > files, teach the diff tool to try fs/xfs/xfs_foo.c if
> > fs/xfs/libxfs/xfs_foo.c doesn't exist.
> 
> I'd prefer we have a strategy that moves fs/xfs files to
> fs/xfs/libxfs once they are synced instead of breaking the "files
> in libxfs/ are the same in both user and kernel space" rule we set
> for libxfs...

Ok, I will kill this patch.

--D

> Cheers,
> 
> Dave.
> -- 
> Dave Chinner
> david@fromorbit.com
diff mbox series

Patch

diff --git a/tools/libxfs-diff b/tools/libxfs-diff
index fa57c004..c18ad487 100755
--- a/tools/libxfs-diff
+++ b/tools/libxfs-diff
@@ -22,5 +22,6 @@  dir="$(readlink -m "${dir}/..")"
 
 for i in libxfs/xfs*.[ch]; do
 	kfile="${dir}/$i"
+	test -f "${kfile}" || kfile="$(echo "${kfile}" | sed -e 's|libxfs/||g')"
 	diff -Naurpw --label "$i" <(sed -e '/#include/d' "$i") --label "${kfile}" <(sed -e '/#include/d' "${kfile}")
 done