https://github.com/torvalds/linux
Raw File
Tip revision: 39cd87c4eb2b893354f3b850f916353f2658ae6f authored by Linus Torvalds on 31 March 2024, 21:32:39 UTC
Linux 6.9-rc2
Tip revision: 39cd87c
orc_hash.sh
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (c) Meta Platforms, Inc. and affiliates.

set -e

printf '%s' '#define ORC_HASH '

awk '
/^#define ORC_(REG|TYPE)_/ { print }
/^struct orc_entry {$/ { p=1 }
p { print }
/^}/ { p=0 }' |
	sha1sum |
	cut -d " " -f 1 |
	sed 's/\([0-9a-f]\{2\}\)/0x\1,/g'
back to top