• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/sh
2################################################################################
3#
4# Copyright (C) 2022 Huawei Device Co., Ltd.
5# SPDX-License-Identifier: GPL-2.0
6#
7# Legacy blkg rwstat helpers enabled by CONFIG_BLK_CGROUP_RWSTAT.
8# Do not use in new code.
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16################################################################################
17# File: libapi.sh
18#
19# Description: shell library api for linuxkerneltest
20#
21# Authors:     Ma Feng - mafeng.ma@huawei.com
22#
23# History:     Mar 15 2022 - init scripts
24#
25################################################################################
26
27print_error()
28{
29    echo -e "\033[41m$1\033[0m"
30}
31
32print_warn()
33{
34    echo -e "\033[43m$1\033[0m"
35}
36
37print_pass()
38{
39    echo -e "\033[42m$1\033[0m"
40}
41
42print_info()
43{
44    echo -e "\033[37m$1\033[0m"
45}
46
47print_deg()
48{
49    if [ $DEBUG -eq 1 ]; then
50        echo -e "\033[1;33m$1\033[0m"
51    fi
52}
53