Move fd flow code into flow.c

This commit is contained in:
Ian Gulliver
2016-03-02 19:16:23 -08:00
parent 896874e9d7
commit 20bc50795d
5 changed files with 12 additions and 12 deletions

View File

@@ -8,6 +8,7 @@
#include "exec.h"
#include "file.h"
#include "flow.h"
#include "incoming.h"
#include "outgoing.h"
#include "receive.h"
@@ -135,8 +136,7 @@ bool opts_add_exec_send(char *arg) {
bool opts_add_stdin(char __attribute__((unused)) *arg) {
int fd = fcntl(0, F_DUPFD_CLOEXEC, 0);
assert(fd >= 0);
file_fd_new(fd, receive_flow, NULL);
return true;
return flow_new(fd, receive_flow, NULL);
}
bool opts_add_stdout(char *arg) {
@@ -146,6 +146,5 @@ bool opts_add_stdout(char *arg) {
}
int fd = fcntl(1, F_DUPFD_CLOEXEC, 0);
assert(fd >= 0);
file_fd_new(fd, send_flow, serializer);
return true;
return flow_new(fd, send_flow, serializer);
}