xref: /linux/tools/testing/selftests/ptp/ptpchmaskfmt.sh (revision 6e7fd890f1d6ac83805409e9c346240de2705584)
1#!/bin/bash
2# SPDX-License-Identifier: GPL-2.0
3
4# Simple helper script to transform ptp debugfs timestamp event queue filtering
5# masks from decimal values to hexadecimal values
6
7# Only takes the debugfs mask file path as an argument
8DEBUGFS_MASKFILE="${1}"
9
10#shellcheck disable=SC2013,SC2086
11for int in $(cat "$DEBUGFS_MASKFILE") ; do
12    printf '0x%08X ' "$int"
13done
14echo
15