n810: Add fstab for maemo filesystems
[openwrt.git] / target / linux / coldfire / patches / 001-mcfv4e_checkfiles_script.patch
1 From d54d785a28afb65811c5d5ad727c57233deb6f60 Mon Sep 17 00:00:00 2001
2 From: Kurt Mahan <kmahan@freescale.com>
3 Date: Wed, 31 Oct 2007 16:36:51 -0600
4 Subject: [PATCH] Scripts to allow running files through checkpatch.pl
5
6 Scripts based on scripts/checkfiles that are in various trees.
7
8 These should not be sent up because there are already patches from
9 the original script author.
10
11 LTIBName: mcfv4e-checkfiles-script
12 Signed-off-by: Kurt Mahan <kmahan@freescale.com>
13 ---
14 scripts/checkfiles | 35 +++++++++++++++++++++++++++++++++++
15 scripts/checkfilesterse | 34 ++++++++++++++++++++++++++++++++++
16 2 files changed, 69 insertions(+), 0 deletions(-)
17 create mode 100755 scripts/checkfiles
18 create mode 100755 scripts/checkfilesterse
19
20 --- /dev/null
21 +++ b/scripts/checkfiles
22 @@ -0,0 +1,35 @@
23 +#!/bin/sh
24 +# (c) 2007, Erez Zadok <ezk@cs.sunysb.edu> (initial version)
25 +# Licensed under the terms of the GNU GPL License version 2
26 +#
27 +# Check source files for compliance with coding standards, using terse
28 +# output in the style that g/cc produces. This output can be easily parsed
29 +# within text editors (e.g., emacs/vim) which can produce a split text
30 +# screen showing in one screen the error message, and in another screen the
31 +# corresponding source file, with the cursor placed on the offending line.
32 +# See for example the documentation for Emacs's "next-error" command, often
33 +# bound to M-x ` (ESC x back-tick).
34 +
35 +# Usage: checkfiles file [files...]
36 +# if "file" is a directory, will check all *.[hc] files recursively
37 +
38 +# check usage
39 +usage() {
40 + echo "Usage: checkfiles file [files...]"
41 + echo "(if \"file\" is a directory, check recursively for all C sources/headers)"
42 + exit 1
43 +}
44 +
45 +# if test -z "$@" ; then
46 +# usage
47 +# fi
48 +if ! test -f scripts/checkpatch.pl ; then
49 + echo "checkfiles: must run from top level source tree"
50 + exit 1
51 +fi
52 +
53 +# check coding-style compliance of each source file found
54 +find "$@" -type f -name '*.[hc]' | \
55 +while read f ; do
56 + diff -u /dev/null $f | perl scripts/checkpatch.pl -
57 +done
58 --- /dev/null
59 +++ b/scripts/checkfilesterse
60 @@ -0,0 +1,34 @@
61 +#!/bin/sh
62 +# (c) 2007, Erez Zadok <ezk@cs.sunysb.edu> (initial version)
63 +# Licensed under the terms of the GNU GPL License version 2
64 +#
65 +# Check source files for compliance with coding standards, using terse
66 +# output in the style that g/cc produces. This output can be easily parsed
67 +# within text editors (e.g., emacs/vim) which can produce a split text
68 +# screen showing in one screen the error message, and in another screen the
69 +# corresponding source file, with the cursor placed on the offending line.
70 +# See for example the documentation for Emacs's "next-error" command, often
71 +# bound to M-x ` (ESC x back-tick).
72 +
73 +# Usage: checkfiles file [files...]
74 +# if "file" is a directory, will check all *.[hc] files recursively
75 +
76 +# check usage
77 +usage() {
78 + echo "Usage: checkfiles file [files...]"
79 + echo "(if \"file\" is a directory, check recursively for all C sources/headers)"
80 + exit 1
81 +}
82 +if test -z "" ; then
83 + usage
84 +fi
85 +if ! test -f scripts/checkpatch.pl ; then
86 + echo "checkfiles: must run from top level source tree"
87 + exit 1
88 +fi
89 +
90 +# check coding-style compliance of each source file found, using terse output
91 +find "$@" -type f -name '*.[hc]' | \
92 +while read f ; do
93 + diff -u /dev/null $f | perl scripts/checkpatch.pl -t -
94 +done
This page took 0.047571 seconds and 5 git commands to generate.