Skip to content

Commit db0e0b9

Browse files
xiaoxiang781216GUIDINGLI
authored andcommitted
adbd/logcat: Change alog_ prefix to logcat_
to unify the prefix usage in the code base Signed-off-by: Xiang Xiao <[email protected]>
1 parent 8930743 commit db0e0b9

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

system/adb/logcat_service.c

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@
3636
* Private types
3737
****************************************************************************/
3838

39-
typedef struct alog_service_s
39+
typedef struct logcat_service_s
4040
{
4141
adb_service_t service;
4242
uv_poll_t poll;
4343
int wait_ack;
44-
} alog_service_t;
44+
} logcat_service_t;
4545

4646
/****************************************************************************
4747
* Private Function Prototypes
@@ -54,16 +54,16 @@ static void logcat_on_data_available(uv_poll_t * handle,
5454
* Private Functions
5555
****************************************************************************/
5656

57-
static int alog_on_write(adb_service_t *service, apacket *p)
57+
static int logcat_on_write(adb_service_t *service, apacket *p)
5858
{
5959
UNUSED(p);
6060
UNUSED(service);
6161
return -1;
6262
}
6363

64-
static void alog_on_kick(struct adb_service_s *service)
64+
static void logcat_on_kick(struct adb_service_s *service)
6565
{
66-
alog_service_t *svc = container_of(service, alog_service_t, service);
66+
logcat_service_t *svc = container_of(service, logcat_service_t, service);
6767
if (!svc->wait_ack)
6868
{
6969
int ret;
@@ -72,26 +72,26 @@ static void alog_on_kick(struct adb_service_s *service)
7272
}
7373
}
7474

75-
static int alog_on_ack(adb_service_t *service, apacket *p)
75+
static int logcat_on_ack(adb_service_t *service, apacket *p)
7676
{
7777
UNUSED(p);
78-
alog_service_t *svc = container_of(service, alog_service_t, service);
78+
logcat_service_t *svc = container_of(service, logcat_service_t, service);
7979
svc->wait_ack = 0;
80-
alog_on_kick(service);
80+
logcat_on_kick(service);
8181
return 0;
8282
}
8383

8484
static void close_cb(uv_handle_t *handle)
8585
{
86-
alog_service_t *service = container_of(handle, alog_service_t, poll);
86+
logcat_service_t *service = container_of(handle, logcat_service_t, poll);
8787
free(service);
8888
}
8989

90-
static void alog_close(struct adb_service_s *service)
90+
static void logcat_on_close(struct adb_service_s *service)
9191
{
9292
int fd;
9393
int ret;
94-
alog_service_t *svc = container_of(service, alog_service_t, service);
94+
logcat_service_t *svc = container_of(service, logcat_service_t, service);
9595

9696
ret = uv_fileno((uv_handle_t *)&svc->poll, &fd);
9797
assert(ret == 0);
@@ -100,12 +100,12 @@ static void alog_close(struct adb_service_s *service)
100100
uv_close((uv_handle_t *)&svc->poll, close_cb);
101101
}
102102

103-
static const adb_service_ops_t logcat_ops =
103+
static const adb_service_ops_t g_logcat_ops =
104104
{
105-
.on_write_frame = alog_on_write,
106-
.on_ack_frame = alog_on_ack,
107-
.on_kick = alog_on_kick,
108-
.on_close = alog_close
105+
.on_write_frame = logcat_on_write,
106+
.on_ack_frame = logcat_on_ack,
107+
.on_kick = logcat_on_kick,
108+
.on_close = logcat_on_close
109109
};
110110

111111
static void logcat_on_data_available(uv_poll_t * handle,
@@ -114,7 +114,7 @@ static void logcat_on_data_available(uv_poll_t * handle,
114114
int ret;
115115
int fd;
116116
apacket_uv_t *ap;
117-
alog_service_t *service = container_of(handle, alog_service_t, poll);
117+
logcat_service_t *service = container_of(handle, logcat_service_t, poll);
118118
adb_client_uv_t *client = (adb_client_uv_t *)handle->data;
119119

120120
ap = adb_uv_packet_allocate(client, 0);
@@ -181,15 +181,15 @@ static void logcat_on_data_available(uv_poll_t * handle,
181181
adb_service_t * logcat_service(adb_client_t *client, const char *params)
182182
{
183183
int ret;
184-
alog_service_t *service =
185-
(alog_service_t *)malloc(sizeof(alog_service_t));
184+
logcat_service_t *service =
185+
(logcat_service_t *)malloc(sizeof(logcat_service_t));
186186

187187
if (service == NULL)
188188
{
189189
return NULL;
190190
}
191191

192-
service->service.ops = &logcat_ops;
192+
service->service.ops = &g_logcat_ops;
193193
service->wait_ack = 0;
194194

195195
/* TODO parse params string to extract logcat parameters */
@@ -208,7 +208,7 @@ adb_service_t * logcat_service(adb_client_t *client, const char *params)
208208
assert(ret == 0);
209209

210210
service->poll.data = client;
211-
alog_on_kick(&service->service);
211+
logcat_on_kick(&service->service);
212212

213213
return &service->service;
214214
}

0 commit comments

Comments
 (0)