Fix: Remove 'type' argument from access_ok() function (v5.0)
[lttng-modules.git] / scripts / rt-patch-version.sh
... / ...
CommitLineData
1#!/bin/sh
2# SPDX-License-Identifier: (GPL-2.0 OR LGPL-2.1)
3
4# First argument is the path to the kernel headers.
5KPATH="$1"
6
7VERSIONFILE=""
8
9if [ -f "${KPATH}/localversion-rt" ]; then
10 VERSIONFILE="${KPATH}/localversion-rt"
11
12elif [ -f "${KPATH}/source/localversion-rt" ]; then
13 VERSIONFILE="${KPATH}/source/localversion-rt"
14else
15 echo 0
16 exit 0
17fi
18
19RT_PATCH_VERSION=$(sed -rn 's/^-rt([0-9]+)$/\1/p' "${VERSIONFILE}")
20
21if [ "x${RT_PATCH_VERSION}" = "x" ]; then
22 echo 0
23 exit 0
24fi
25
26echo "${RT_PATCH_VERSION}"
This page took 0.032175 seconds and 4 git commands to generate.