File: libxfs-diff

package info (click to toggle)
xfsprogs 6.18.0-1
  • links: PTS
  • area: main
  • in suites: sid
  • size: 11,304 kB
  • sloc: ansic: 167,330; sh: 4,604; makefile: 1,337; python: 835; cpp: 5
file content (26 lines) | stat: -rwxr-xr-x 572 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0

if [ -z "$1" ] || [ ! -d "$1" ] || [ "$1" = "--help" ]; then
	echo "Usage: $0 kernel_libxfs_dir"
	exit 1
fi

if [ ! -d "libxfs/" ]; then
	echo "$0: Must be run from the top level directory."
	exit 2
fi

dir="$1"

if [ ! -e "${dir}/xfs_format.h" ]; then
	echo "${dir}: This doesn't seem to be a libxfs/ directory."
	exit 3
fi

dir="$(readlink -m "${dir}/..")"

for i in libxfs/xfs*.[ch]; do
	kfile="${dir}/$i"
	diff -Naurpw --label "$i" <(sed -e '/#include/d' "$i") --label "${kfile}" <(sed -e '/#include/d' "${kfile}")
done