| 60 | } |
| 61 | |
| 62 | int open_comm(const char *name) |
| 63 | { |
| 64 | int fd; |
| 65 | fd = open(name, O_RDWR | O_NOCTTY | O_NONBLOCK, 0); |
| 66 | if(fd == -1) |
| 67 | { |
| 68 | rt_kprintf("Open %s fail.\n",name); |
| 69 | return -1; |
| 70 | } |
| 71 | else |
| 72 | { |
| 73 | rt_kprintf("Open %s success,fd:%d\n",name,fd); |
| 74 | } |
| 75 | |
| 76 | return fd; |
| 77 | } |
| 78 | |
| 79 | void close_comm(int fd) |
| 80 | { |
no test coverage detected