bf3fe05dfb
This needs some more testing before it's on by default. If the card is otherwise functioning, these messages may be confusing to the user. If the card is not functioning, the driver can be reloaded with debug to check for this condition. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9205 a0bf4364-ded3-4de4-8d8a-66a801d63aff
49 lines
1.1 KiB
Bash
Executable File
49 lines
1.1 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
# A simple wrapper to the kernel.org script checkpatch.pl
|
|
|
|
# Usage:
|
|
#
|
|
# svn diff | ./build_tools/kernel-cp -
|
|
# ./build_tools/kernel-cp my.diff
|
|
# ./build_tools/kernel-cp --file drivers/dahdi/wctdm.c
|
|
|
|
mydir=`dirname $0`
|
|
|
|
check_patch_dir="$mydir/cp"
|
|
rel_path="scripts/checkpatch.pl"
|
|
check_patch="$mydir/checkpatch.pl"
|
|
URL='http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob_plain;f=scripts/checkpatch.pl;hb=HEAD'
|
|
|
|
# Required files in directories in the tree
|
|
SUBDIRS="fs ipc lib arch init scripts drivers kernel Documentation include"
|
|
|
|
set -e
|
|
|
|
if [ "$1" = 'download' ]; then
|
|
if [ -x "$check_patch" ]; then
|
|
exit 0
|
|
fi
|
|
|
|
wget -O "$check_patch" "$URL"
|
|
if [ `wc -c <"$check_patch"` -lt 1000 ]; then
|
|
# already downloaded
|
|
# FIXME: redirection fails on downloading and you get a
|
|
# short HTML file as your "script".
|
|
echo >&2 "$0: Error: Download failed".
|
|
exit 1
|
|
fi
|
|
chmod +x "$check_patch"
|
|
|
|
exit 0
|
|
fi
|
|
|
|
if [ ! -x "$check_patch" ]; then
|
|
echo >&2 "Script $check_patch not found. Download it?"
|
|
echo >&2 ""
|
|
echo >&2 " $0 download"
|
|
exit 1
|
|
fi
|
|
|
|
exec $check_patch --no-tree --no-signoff "$@"
|