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

Message ID 156633307795.1215978.8644291951311062567.stgit@magnolia
State New
Headers show
Series
  • xfsprogs-5.3: various fixes
Related show

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

Patch
diff mbox series

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