From 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5 Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Tue, 22 Oct 2024 10:36:11 +0000 Subject: [PATCH] 修改4g拨号为QMI,需要在系统里后台执行quectel-CM --- kernel/tools/power/cpupower/utils/cpupower-info.c | 14 +++++++++++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff --git a/kernel/tools/power/cpupower/utils/cpupower-info.c b/kernel/tools/power/cpupower/utils/cpupower-info.c index c7caa8e..0ba61a2 100644 --- a/kernel/tools/power/cpupower/utils/cpupower-info.c +++ b/kernel/tools/power/cpupower/utils/cpupower-info.c @@ -1,7 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * (C) 2011 Thomas Renninger <trenn@suse.de>, Novell Inc. - * - * Licensed under the terms of the GNU GPL License version 2. */ @@ -11,6 +10,7 @@ #include <errno.h> #include <string.h> #include <getopt.h> +#include <sys/utsname.h> #include "helpers/helpers.h" #include "helpers/sysfs.h" @@ -31,6 +31,7 @@ extern char *optarg; extern int optind, opterr, optopt; unsigned int cpu; + struct utsname uts; union { struct { @@ -39,6 +40,13 @@ int params; } params = {}; int ret = 0; + + ret = uname(&uts); + if (!ret && (!strcmp(uts.machine, "ppc64le") || + !strcmp(uts.machine, "ppc64"))) { + fprintf(stderr, _("Subcommand not supported on POWER.\n")); + return ret; + } setlocale(LC_ALL, ""); textdomain(PACKAGE); @@ -54,7 +62,7 @@ default: print_wrong_arg_exit(); } - }; + } if (!params.params) params.params = 0x7; -- Gitblit v1.6.2