lin
2025-08-21 57113df3a0e2be01232281fad9a5f2c060567981
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# the following functions use to comunication with core.
# example:
#   SEND_CMD_PIPE_OK $3
# or
#   SEND_CMD_PIPE_FAIL
#
# send message to core
SEND_CMD_PIPE_MSG()
{
    echo "$1 -1 $2" >> /tmp/cmd_pipe
}
 
# send OK to core
SEND_CMD_PIPE_OK()
{
    echo "$1 0" >> /tmp/cmd_pipe
}
 
# send OK with message to core
SEND_CMD_PIPE_OK_EX()
{
    echo "$1 0 $2" >> /tmp/cmd_pipe
}
 
# send Fail to core
SEND_CMD_PIPE_FAIL()
{
    echo "$1 1" >> /tmp/cmd_pipe
}
 
# send Fail with message to core
SEND_CMD_PIPE_FAIL_EX()
{
    echo "$1 1 $2" >> /tmp/cmd_pipe
}