Skip to content
Snippets Groups Projects
Commit c5ebfe59 authored by an7s's avatar an7s
Browse files

Use read/write cgc libc wrappers

parent 935406ab
No related branches found
No related tags found
No related merge requests found
......@@ -12,7 +12,7 @@ void print_str2(char *s)
static void send_response(const int fd, struct response *res)
{
cgc_transmit(fd, res, sizeof(struct response));
write(fd, res, sizeof(struct response));
}
static void send_error_response(const int fd)
......@@ -233,7 +233,7 @@ void commandLoop()
do {
clear_request(&req);
int bytes_read = cgc_receive(fdin, &req, sizeof(struct request));
int bytes_read = read(fdin, &req, sizeof(struct request));
itox(bytes_read, s);
print_str2("commandLoop(): ... bytes read: \n");
......
......@@ -38,13 +38,13 @@
#define write_fd 1
void print_str(char *s)
{
write(write_fd,s,strlen(s));
cgc_transmit(write_fd,s,strlen(s));
}
void print_int(int x)
{
char buf[100];
itox(x,buf);
write(write_fd,buf,strlen(buf));
cgc_transmit(write_fd,buf,strlen(buf));
}
#endif
......
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