From 2878ec58903f434e569d93f113f74b1bffbe2228 Mon Sep 17 00:00:00 2001 From: Lai Jiangshan Date: Tue, 11 Oct 2016 17:33:06 +0800 Subject: [PATCH] remove unused hyper_open_serial_dev() Signed-off-by: Lai Jiangshan --- src/util.c | 10 ---------- src/util.h | 1 - 2 files changed, 11 deletions(-) diff --git a/src/util.c b/src/util.c index f082be0..8f7ab24 100644 --- a/src/util.c +++ b/src/util.c @@ -565,16 +565,6 @@ int hyper_insmod(char *module) } #endif -int hyper_open_serial_dev(char *tty) -{ - int fd = open(tty, O_RDWR | O_CLOEXEC | O_NOCTTY); - - if (fd < 0) - perror("fail to open tty device"); - - return fd; -} - int hyper_setfd_cloexec(int fd) { int flags = fcntl(fd, F_GETFD); diff --git a/src/util.h b/src/util.h index a802169..0c24017 100644 --- a/src/util.h +++ b/src/util.h @@ -30,7 +30,6 @@ void hyper_filize(char *hyper_path); int hyper_mkdir(char *path, mode_t mode); int hyper_write_file(const char *path, const char *value, size_t len); int hyper_open_channel(char *channel, int mode); -int hyper_open_serial_dev(char *tty); int hyper_setfd_cloexec(int fd); int hyper_setfd_block(int fd); int hyper_setfd_nonblock(int fd);