Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
hardware_libhardware_legacy
Commits
2dbd8949
Commit
2dbd8949
authored
13 years ago
by
Vladimir Chtchetkine
Browse files
Options
Download
Email Patches
Plain Diff
Enable QEMUD pipe connection for all legacy hw-control clients
Change-Id: Ic713d4cdcddb724958fc8c1c8a82a1dc2733da32
parent
ef6b8ea3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
2 deletions
+24
-2
qemu/qemu.c
qemu/qemu.c
+24
-2
No files found.
qemu/qemu.c
View file @
2dbd8949
...
...
@@ -36,6 +36,7 @@
# define D(...) ((void)0)
#endif
#include "hardware/qemu_pipe.h"
int
qemu_check
(
void
)
...
...
@@ -70,6 +71,24 @@ qemu_fd_read( int fd, char* buff, int len )
return
len2
;
}
static
int
qemu_channel_open_qemud_pipe
(
QemuChannel
*
channel
,
const
char
*
name
)
{
int
fd
;
char
pipe_name
[
512
];
snprintf
(
pipe_name
,
sizeof
(
pipe_name
),
"qemud:%s"
,
name
);
fd
=
qemu_pipe_open
(
pipe_name
);
if
(
fd
<
0
)
{
D
(
"no qemud pipe: %s"
,
strerror
(
errno
));
return
-
1
;
}
channel
->
is_qemud
=
1
;
channel
->
fd
=
fd
;
return
0
;
}
static
int
qemu_channel_open_qemud
(
QemuChannel
*
channel
,
...
...
@@ -174,6 +193,9 @@ qemu_channel_open( QemuChannel* channel,
channel
->
is_inited
=
1
;
do
{
if
(
qemu_channel_open_qemud_pipe
(
channel
,
name
)
==
0
)
break
;
if
(
qemu_channel_open_qemud
(
channel
,
name
)
==
0
)
break
;
...
...
@@ -226,7 +248,7 @@ qemu_channel_open( QemuChannel* channel,
static
int
qemu_command_vformat
(
char
*
buffer
,
qemu_command_vformat
(
char
*
buffer
,
int
buffer_size
,
const
char
*
format
,
va_list
args
)
...
...
@@ -247,7 +269,7 @@ qemu_command_vformat( char* buffer,
}
extern
int
qemu_command_format
(
char
*
buffer
,
qemu_command_format
(
char
*
buffer
,
int
buffer_size
,
const
char
*
format
,
...
)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment