Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions iarm_query_powerstate/IARM_Bus_CheckPowerStatus.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* If not stated otherwise in this file or this component's LICENSE file the
* following copyright and licenses apply:

Check failure on line 3 in iarm_query_powerstate/IARM_Bus_CheckPowerStatus.c

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'iarm_query_powerstate/IARM_Bus_CheckPowerStatus.c' (Match: rdk/components/generic/sys_mon_tools/iarm_query_powerstate/rdk/components/generic/sys_mon_tools/iarm_query_powerstate/2.1-20161212, 80 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/sys_mon_tools/iarm_query_powerstate/+archive/2.1-20161212.tar.gz, file: IARM_Bus_CheckPowerStatus.c)
*
* Copyright 2016 RDK Management
*
Expand Down Expand Up @@ -81,7 +81,7 @@
int ret = 0;

if (argc > 1) {
if (argv[1][1] == 'c') {
if (argv[1] && strlen(argv[1]) > 1 && argv[1][1] == 'c') {
uint32_t res = 0;
PowerController_PowerState_t curState = POWER_STATE_UNKNOWN, previousState = POWER_STATE_UNKNOWN;

Expand Down Expand Up @@ -126,8 +126,12 @@
memset(&pwrSettings, 0, sizeof(PWRMgr_Settings_t));

if (fd > 0) {
lseek(fd, 0, SEEK_SET);
ret = read(fd, &pwrSettings, (sizeof(PWRMgr_Settings_t) - PADDING_SIZE));
off_t seek_result = lseek(fd, 0, SEEK_SET);
if (seek_result < 0) {
printf("Error in seeking PWRMgr settings File");
} else {
ret = read(fd, &pwrSettings, (sizeof(PWRMgr_Settings_t) - PADDING_SIZE));
}

close(fd);
}
Expand Down
2 changes: 1 addition & 1 deletion iarm_set_powerstate/IARM_BUS_SetPowerStatus.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ typedef struct {
static void* asyncThreadMain(void* arg)
{
Controller* controller = (Controller*)arg;
usleep((controller->ack - 0.05) * 1000000); // Ack delay minus 50ms
usleep(controller->ack * 1000000 - 50000); // Ack delay minus 50ms
PowerController_PowerModePreChangeComplete(controller->clientId, controller->transactionId);
return NULL;
}
Expand Down
8 changes: 6 additions & 2 deletions key_simulator/IARM_BUS_UIEventSimulator.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* If not stated otherwise in this file or this component's LICENSE file the
* following copyright and licenses apply:

Check failure on line 3 in key_simulator/IARM_BUS_UIEventSimulator.c

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'key_simulator/IARM_BUS_UIEventSimulator.c' (Match: rdk/components/generic/sys_mon_tools/key_simulator/rdk/components/generic/sys_mon_tools/key_simulator/c7c2639, 284 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/sys_mon_tools/key_simulator/+archive/c7c2639a97918c73e74d0241d9c0c9ab047f770a.tar.gz, file: IARM_BUS_UIEventSimulator.c)

Check failure on line 3 in key_simulator/IARM_BUS_UIEventSimulator.c

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'key_simulator/IARM_BUS_UIEventSimulator.c' (Match: rdk/components/generic/sys_mon_tools/key_simulator/rdk/components/generic/sys_mon_tools/key_simulator/2007, 284 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/sys_mon_tools/key_simulator/+archive/RDK-DEV-2007.tar.gz, file: IARM_BUS_UIEventSimulator.c)
*
* Copyright 2016 RDK Management
*
Expand Down Expand Up @@ -230,8 +230,12 @@
printf("Sending Key (%x, %x) from %s\r\n", keyType, keyCode, executableName);
printf("%d:%s: Using UINPUT dipatcher", __LINE__, __func__);
uinput_dispatcher_t dispatcher = UINPUT_GetDispatcher();
/*Time being replacing scan code with 0 to run the functionality*/
dispatcher( keyCode, keyType, 0);
if (dispatcher != NULL) {
/*Time being replacing scan code with 0 to run the functionality*/
dispatcher( keyCode, keyType, 0);
} else {
printf("%d:%s: Error: UINPUT dispatcher not available\n", __LINE__, __func__ );
}
}

/**
Expand Down
Loading