Skip to content
Snippets Groups Projects
Commit 05e50e8f authored by Marc-André Lureau's avatar Marc-André Lureau
Browse files

io: make qio_channel_command_new_pid() static


The function isn't used outside of qio_channel_command_new_spawn(),
which is !win32-specific.

Signed-off-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
parent 22e135fc
No related branches found
No related tags found
No related merge requests found
......@@ -45,31 +45,6 @@ struct QIOChannelCommand {
};
/**
* qio_channel_command_new_pid:
* @writefd: the FD connected to the command's stdin
* @readfd: the FD connected to the command's stdout
* @pid: the PID of the running child command
* @errp: pointer to a NULL-initialized error object
*
* Create a channel for performing I/O with the
* previously spawned command identified by @pid.
* The two file descriptors provide the connection
* to command's stdio streams, either one or which
* may be -1 to indicate that stream is not open.
*
* The channel will take ownership of the process
* @pid and will kill it when closing the channel.
* Similarly it will take responsibility for
* closing the file descriptors @writefd and @readfd.
*
* Returns: the command channel object, or NULL on error
*/
QIOChannelCommand *
qio_channel_command_new_pid(int writefd,
int readfd,
pid_t pid);
/**
* qio_channel_command_new_spawn:
* @argv: the NULL terminated list of command arguments
......
......@@ -26,8 +26,28 @@
#include "qemu/sockets.h"
#include "trace.h"
QIOChannelCommand *
#ifndef WIN32
/**
* qio_channel_command_new_pid:
* @writefd: the FD connected to the command's stdin
* @readfd: the FD connected to the command's stdout
* @pid: the PID of the running child command
* @errp: pointer to a NULL-initialized error object
*
* Create a channel for performing I/O with the
* previously spawned command identified by @pid.
* The two file descriptors provide the connection
* to command's stdio streams, either one or which
* may be -1 to indicate that stream is not open.
*
* The channel will take ownership of the process
* @pid and will kill it when closing the channel.
* Similarly it will take responsibility for
* closing the file descriptors @writefd and @readfd.
*
* Returns: the command channel object, or NULL on error
*/
static QIOChannelCommand *
qio_channel_command_new_pid(int writefd,
int readfd,
pid_t pid)
......@@ -44,8 +64,6 @@ qio_channel_command_new_pid(int writefd,
return ioc;
}
#ifndef WIN32
QIOChannelCommand *
qio_channel_command_new_spawn(const char *const argv[],
int flags,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment