diff options
Diffstat (limited to 'scripts/atomic/chkdup.sh')
-rw-r--r-- | scripts/atomic/chkdup.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/scripts/atomic/chkdup.sh b/scripts/atomic/chkdup.sh new file mode 100644 index 000000000000..04bb4f5c5c34 --- /dev/null +++ b/scripts/atomic/chkdup.sh @@ -0,0 +1,27 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0 +# +# Check to see if the specified atomic is already in use. This is +# done by keeping filenames in the temporary directory specified by the +# environment variable T. +# +# Usage: +# chkdup.sh name fallback +# +# The "name" argument is the name of the function to be generated, and +# the "fallback" argument is the name of the fallback script that is +# doing the generation. +# +# If the function is a duplicate, output a comment saying so and +# exit with non-zero (error) status. Otherwise exit successfully +# +# If the function is a duplicate, output a comment saying so and +# exit with non-zero (error) status. Otherwise exit successfully. + +if test -f ${T}/${1} +then + echo // Fallback ${2} omitting duplicate "${1}()" kernel-doc header. + exit 1 +fi +touch ${T}/${1} +exit 0 |