RDK Documentation (Open Sourced RDK Components)
wareHouseClear.c
1
/*
2
* If not stated otherwise in this file or this component's Licenses.txt file the
3
* following copyright and licenses apply:
4
*
5
* Copyright 2016 RDK Management
6
*
7
* Licensed under the Apache License, Version 2.0 (the "License");
8
* you may not use this file except in compliance with the License.
9
* You may obtain a copy of the License at
10
*
11
* http://www.apache.org/licenses/LICENSE-2.0
12
*
13
* Unless required by applicable law or agreed to in writing, software
14
* distributed under the License is distributed on an "AS IS" BASIS,
15
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
* See the License for the specific language governing permissions and
17
* limitations under the License.
18
*/
19
20
21
/**
22
* @defgroup iarmmgrs
23
* @{
24
* @defgroup power
25
* @{
26
**/
27
28
29
#include <stdio.h>
30
#include <stdlib.h>
31
#include "resetModes.h"
32
#include "pwrlogger.h"
33
34
int
processWHClear()
35
{
36
/*Code copied from X1.. Needs modification*/
37
LOG(
"\n Clear: Processing Ware House Clear\n"
);
38
fflush(stdout);
39
40
system(
"echo 0 > /opt/.rebootFlag"
);
41
system(
"touch /tmp/.warehouse-clear"
);
42
system(
"echo `/bin/timestamp` ------------- Warehouse Clear --------------- >> /opt/logs/receiver.log"
);
43
system(
"sh /lib/rdk/deviceReset.sh WAREHOUSE_CLEAR"
);
44
45
return
1;
46
}
47
48
int
processWHClearNoReboot()
49
{
50
LOG(
"\n Clear: Invoking Ware House Clear Request from APP\n"
);
51
fflush(stdout);
52
53
system(
"touch /tmp/.warehouse-clear"
);
54
return
system(
"sh /lib/rdk/deviceReset.sh WAREHOUSE_CLEAR --suppressReboot"
);
55
}
56
57
58
/** @} */
59
/** @} */
components
generic
iarmmgrs
pwrmgr2
wareHouseClear.c
Generated on Thu Feb 9 2023 06:32:30 for RDK Documentation (Open Sourced RDK Components) by
1.8.17