Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / tools / testing / selftests / ptp / ptpchmaskfmt.sh
blob0a06ba8af300c4cf69b3c78a7df11eb07581e2a3
1 #!/bin/bash
2 # SPDX-License-Identifier: GPL-2.0
4 # Simple helper script to transform ptp debugfs timestamp event queue filtering
5 # masks from decimal values to hexadecimal values
7 # Only takes the debugfs mask file path as an argument
8 DEBUGFS_MASKFILE="${1}"
10 #shellcheck disable=SC2013,SC2086
11 for int in $(cat "$DEBUGFS_MASKFILE") ; do
12 printf '0x%08X ' "$int"
13 done
14 echo