#!/bin/bash
# -*- tab-width: 4; sh-indentation: 4; sh-basic-offset: 4; indent-tabs-mode: t; -*-
# SPDX-FileCopyrightText: Copyright (c) 2016 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: LicenseRef-NvidiaProprietary
#
# NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
# property and proprietary rights in and to this material, related
# documentation and any modifications thereto. Any use, reproduction,
# disclosure or distribution of this material and related documentation
# without an express license agreement from NVIDIA CORPORATION or
# its affiliates is strictly prohibited.

#
# Wrap Android's "setprop" under L4T
#
prop="${1}"
value="${2}"

echo "${value}" > "/run/nvphs/properties/${prop}"

if [ $? != 0 ]; then
	echo >&2 "Warning: unable to write property '${prop}'"
	exit 1
fi
