fix:Modify file permission information specification

Signed-off-by: toutes <zhaoruiyuan2@huawei.com>
This commit is contained in:
toutes
2022-03-27 23:19:43 -07:00
parent 1702d85463
commit e95969d451
25 changed files with 74 additions and 27 deletions
View File

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2021 Huawei Device Co., Ltd.
# Copyright (c) 2021-2022 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Executable → Regular
+2 -2
View File
@@ -1,5 +1,5 @@
#
# Copyright (c) 2020 Huawei Device Co., Ltd.
# Copyright (c) 2020-2022 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
@@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
import("//build/lite/config/component/lite_component.gni")
Executable → Regular
+2 -2
View File
@@ -1,5 +1,5 @@
#
# Copyright (c) 2020 Huawei Device Co., Ltd.
# Copyright (c) 2020-2022 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
@@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
import("//build/lite/config/subsystem/aafwk/path.gni")
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2021-2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2021-2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
+8 -2
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2021-2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -20,27 +20,33 @@ int32_t GetBatSocImpl(void)
{
return GetBatSoc();
}
BatteryChargeState GetChargingStatusImpl(void)
{
return GetChargingStatus();
}
BatteryHealthState GetHealthStatusImpl(void)
{
return GetHealthStatus();
}
BatteryPluggedType GetPluggedTypeImpl(void)
{
return GetPluggedType();
}
int32_t GetBatVoltageImpl(void)
{
return GetBatVoltage();
}
char *GetBatTechnologyImpl(void)
{
return GetBatTechnology();
}
int32_t GetBatTemperatureImpl(void)
{
return GetBatTemperature();
}
}
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2021-2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2021-2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2021-2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2021-2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2021-2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2021-2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2021-2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2021 Huawei Device Co., Ltd.
# Copyright (c) 2021-2020 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
+7 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2021-2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -31,6 +31,7 @@ static BatteryInterface *GetBatteryInterface(void)
}
IUnknown *iUnknown = GetBatteryIUnknown();
if (iUnknown == NULL) {
pthread_mutex_unlock(&g_mutex);
return NULL;
}
@@ -52,6 +53,7 @@ int32_t GetBatSoc(void)
}
return ret;
}
BatteryChargeState GetChargingStatus(void)
{
BatteryChargeState state = CHARGE_STATE_NONE;
@@ -61,6 +63,7 @@ BatteryChargeState GetChargingStatus(void)
}
return state;
}
BatteryHealthState GetHealthStatus(void)
{
BatteryHealthState state = HEALTH_STATE_UNKNOWN;
@@ -70,6 +73,7 @@ BatteryHealthState GetHealthStatus(void)
}
return state;
}
BatteryPluggedType GetPluggedType(void)
{
BatteryPluggedType state = PLUGGED_TYPE_NONE;
@@ -79,6 +83,7 @@ BatteryPluggedType GetPluggedType(void)
}
return state;
}
int32_t GetBatVoltage(void)
{
int32_t ret = EC_FAILURE;
@@ -98,6 +103,7 @@ char *GetBatTechnology(void)
}
return strBuff;
}
int32_t GetBatTemperature(void)
{
int32_t ret = EC_FAILURE;
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2021 Huawei Device Co., Ltd.
# Copyright (c) 2021-2022 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2021-2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Vendored Executable → Regular
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020 Huawei Device Co., Ltd.
* Copyright (c) 2020-2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2021 Huawei Device Co., Ltd.
# Copyright (c) 2021-2022 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
+22 -2
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2021-2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -33,27 +33,38 @@ static IBattery *g_ibattery = NULL;
static const char *BATTERY_GetName(Service *service)
{
(void)service;
return BATTERY_DEVICE;
}
static BOOL Initialize(Service *service, Identity identity)
{
(void)service;
(void)identity;
return TRUE;
}
static BOOL MessageHandle(Service *service, Request *msg)
{
(void)service;
(void)msg;
return TRUE;
}
static TaskConfig GetTaskConfig(Service *service)
{
(void)service;
TaskConfig config = {LEVEL_HIGH, PRI_BELOW_NORMAL, TASK_CONFIG_STACK_SIZE, TASK_CONFIG_QUEUE_SIZE, SHARED_TASK};
return config;
}
static int32_t Invoke(IServerProxy *iProxy, int funcId, void *origin, IpcIo *req, IpcIo *reply)
{
(void)iProxy;
(void)funcId;
(void)origin;
(void)req;
(void)reply;
return BATTERY_OK;
}
@@ -87,6 +98,9 @@ int32_t GetTemperatureImpl(void)
}
int TurnOnLedImpl(int red, int green, int blue)
{
(void)red;
(void)green;
(void)blue;
return BATTERY_OK;
}
int TurnOffLedImpl(void)
@@ -95,10 +109,16 @@ int TurnOffLedImpl(void)
}
int SetLedColorImpl(int red, int green, int blue)
{
(void)red;
(void)green;
(void)blue;
return BATTERY_OK;
}
int GetLedColorImpl(int *red, int *green, int *blue)
{
(void)red;
(void)green;
(void)blue;
return BATTERY_OK;
}
void ShutDownImpl(void)
@@ -109,7 +129,7 @@ void UpdateBatInfoImpl(BatInfo *battery)
if (battery == NULL) {
return;
}
if (strcpy_s(battery->BatTechnology, BATTECHNOLOGY_LEN, battInfo.BatTechnology) != EOF) {
if (strcpy_s(battery->BatTechnology, BATTECHNOLOGY_LEN, battInfo.BatTechnology) != EOK) {
return;
}
battery->batSoc = battInfo.batSoc;
Executable → Regular
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2021 Huawei Device Co., Ltd.
# Copyright (c) 2021-2022 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2021 Huawei Device Co., Ltd.
# Copyright (c) 2021-2022 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2021-2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Executable → Regular
+15
View File
@@ -1,3 +1,18 @@
/*
* Copyright (c) 2021-2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var battery = require("@system.battery");
battery.BatterySOC({
success: function(data) {