mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	Set the x bit to some scripts to make them directly executable.
Especially, scripts/checkdeclares.pl is not hooked by anyone.
It should be executable since it is tedious to type
'perl scripts/checkdeclares.pl'.
The original patch [1] set the x bit properly, but it was lost when
it was merged as commit 21917bded7 ("scripts: a new script for
checking duplicate struct declaration").
[1] https://lore.kernel.org/lkml/20210401110943.1010796-1-wanjiabing@vivo.com/
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
		
	
			
		
			
				
	
	
		
			9 lines
		
	
	
	
		
			305 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
			
		
		
	
	
			9 lines
		
	
	
	
		
			305 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
#!/bin/sh
 | 
						|
# SPDX-License-Identifier: GPL-2.0
 | 
						|
 | 
						|
if [ ! -f "$1" ]; then
 | 
						|
	SEED=`od -A n -t x8 -N 32 /dev/urandom | tr -d ' \n'`
 | 
						|
	echo "const char *randstruct_seed = \"$SEED\";" > "$1"
 | 
						|
	HASH=`echo -n "$SEED" | sha256sum | cut -d" " -f1 | tr -d ' \n'`
 | 
						|
	echo "#define RANDSTRUCT_HASHED_SEED \"$HASH\"" > "$2"
 | 
						|
fi
 |